IBM Coursera Capstone Project


Introduction: Business Problem

In this project, we are going to compare the neighborhoods of the New York City in the US and the city of Toronto in Canada, and determine how similar they are in terms of businesses. We will analyze for both cities

  • what types of businesses are more likely to thrive;
  • what neighborhoods are suitable for each type of business;
  • what types of businesses are less desirable.

The results of the project will enable more effective decisions making for business people who want to start their business in these two big cities.

Data

Based on definition of our problem, following data sources will be needed to extract/generate the required information:

  • Neiborhood coordinates for New York from IBM Developer Skills Network
  • Neiborhood coordinates for Toronto from Wikipedia
  • Venue data for both New York and Toronto from FOURSQURE

Methodology and Results

Code in this section is based on DP0701EN-3-3-2-Neighborhoods-New-York-py-v2.0, which is part of a lab material in this course (Applied Data Science Capstone).

0. Importing relevant modules and plotting configurations

In [1]:
import numpy as np
import pandas as pd


pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

import json # library to handle JSON files

# !pip install geopy
from geopy.geocoders import Nominatim # convert an address into latitude and longitude values
import requests 
from pandas.io.json import json_normalize # tranform JSON file into a pandas dataframe

# Matplotlib and associated plotting modules
import matplotlib.cm as cm
import matplotlib.colors as colors
from matplotlib import pyplot as plt

from sklearn.cluster import KMeans
import folium # map rendering library
from IPython.display import HTML
import time

print('Libraries imported.')
Libraries imported.
In [2]:
# plotting configurations that will be used later

%config InlineBackend.figure_format = 'retina'
plt.rc('figure', dpi=300)
plt.rc('savefig', dpi=300)
fig_size = (12,6)
big_fig_size = (18,8)
fig_fc = '#ffffff'
pc = ["#4285f4", "#db4437", "#f4b400", "#0f9d58", "#ab47bc", "#00acc1", "#ff7043", 
      "#9e9d24", "#5c6bc0", "#f06292", "#00796b", "#c2185b", "#7e57c2", "#03a9f4", 
      "#8bc34a", "#fdd835", "#fb8c00", "#8d6e63", "#9e9e9e", "#607d8b"]

def plot_conf(ax, xlbl='', ylbl='', t=''):
    """
    This function perform operations to produce better-looking 
    visualizations
    """
    # changing the background color of the plot
    ax.set_facecolor('#ffffff')
    # modifying the ticks on plot axes
    ax.tick_params(axis='both', labelcolor='#616161', color='#ffffff')
    ax.tick_params(axis='both', which='major', labelsize=9)
    # adding a grid and specifying its color
    ax.grid(True, color='#e9e9e9')
    # making the grid appear behind the graph elements
    ax.set_axisbelow(True)
    # hiding axes
    ax.spines['bottom'].set_color('#ffffff')
    ax.spines['top'].set_color('#ffffff') 
    ax.spines['right'].set_color('#ffffff')
    ax.spines['left'].set_color('#ffffff')
    # setting the title, x label, and y label of the plot
    ax.set_title(t, fontsize=14, color='#616161', loc='left', pad=24, fontweight='bold');
    ax.set_xlabel(xlbl, labelpad=16, fontsize=11, color='#616161', fontstyle='italic');
    ax.set_ylabel(ylbl, color='#616161', labelpad=16, fontsize=11, fontstyle='italic');
    
# table configuration
styles = [
    dict(selector="td, th", props=[("border", "1px solid #333"), ("padding", "2px")]),
    dict(selector="th.col_heading", props=[("background", "#eee8d5"), ("color", "#b58900"), ("padding", "5px 8px")]),
    dict(selector="th.index_name", props=[("background", "#eee8d5"), ("color", "#268bd2"), ("padding", "5px 8px")]),
    dict(selector="th.blank", props=[("background", "#eee8d5"), ("color", "#268bd2"), ("padding", "0")]),
    dict(selector="th.row_heading.level0", props=[("background", "rgba(133, 153, 0, 0.1)")]),
    dict(selector="th.row_heading.level1", props=[("background", "rgba(42, 161, 152, 0.1)")]),
    dict(selector="thead tr:nth-child(2) th", props=[("border-bottom", "3px solid #333333")]),
    dict(selector="td:hover", props=[("font-weight", "bold"), ("background", "#002b36"), ("color", "Gold")]),
]

disp_fmt = "<h2 style='color: #b58900'>{}<span style='color: #FF91CE; font-size: 115%'>:</span></h2>"

1. Data for New York City

1.1 Coordinates of neighborhoods in NYC

Downloading and saving neighborhood data of New York City

Once downloaded, we save the data locally so that we can do data experiments without repeatedly downloading the data.

In [3]:
# # We only need to do this once. 
# !wget -q -O './capstone_data/newyork_data.json' https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork/labs/newyork_data.json
# print('Data downloaded!')

Loading the saved neighborhood JSON data for New York City

In [4]:
with open('./capstone_data/newyork_data.json') as json_data:
    newyork_data = json.load(json_data)
# newyork_data
nyc_neighborhoods_data = newyork_data['features']
nyc_neighborhoods_data[0]
Out[4]:
{'type': 'Feature',
 'id': 'nyu_2451_34572.1',
 'geometry': {'type': 'Point',
  'coordinates': [-73.84720052054902, 40.89470517661]},
 'geometry_name': 'geom',
 'properties': {'name': 'Wakefield',
  'stacked': 1,
  'annoline1': 'Wakefield',
  'annoline2': None,
  'annoline3': None,
  'annoangle': 0.0,
  'borough': 'Bronx',
  'bbox': [-73.84720052054902,
   40.89470517661,
   -73.84720052054902,
   40.89470517661]}}

Saving the neighborhood data into a pandas dataframe

In [5]:
# define the dataframe columns
column_names = ['Borough', 'Neighborhood', 'Latitude', 'Longitude'] 

# instantiate the dataframe
nyc_neighborhoods = pd.DataFrame(columns=column_names)

for data in nyc_neighborhoods_data:
    borough             = data['properties']['borough'] 
    neighborhood_name   = data['properties']['name']
    
    neighborhood_latlon = data['geometry']['coordinates']
    neighborhood_lat = neighborhood_latlon[1]
    neighborhood_lon = neighborhood_latlon[0]
    
    nyc_neighborhoods = nyc_neighborhoods.append(
                        {'Borough'     : borough,
                         'Neighborhood': neighborhood_name,
                         'Latitude'    : neighborhood_lat,
                         'Longitude'   : neighborhood_lon}, 
                        ignore_index=True)
In [6]:
nyc_neighborhoods.head()
Out[6]:
Borough Neighborhood Latitude Longitude
0 Bronx Wakefield 40.894705 -73.847201
1 Bronx Co-op City 40.874294 -73.829939
2 Bronx Eastchester 40.887556 -73.827806
3 Bronx Fieldston 40.895437 -73.905643
4 Bronx Riverdale 40.890834 -73.912585
In [7]:
print('The dataframe has {} boroughs and {} neighborhoods.'.format(
        len(nyc_neighborhoods['Borough'].unique()),
        nyc_neighborhoods.shape[0])
)
The dataframe has 5 boroughs and 306 neighborhoods.

Transforming data further (needed later for the venue data)

In this dataframe, there are neighborhoods that share the same name but are located in different boroughs as shown below:

In [8]:
nnvc = nyc_neighborhoods['Neighborhood'].value_counts()
nnvc[nnvc > 1]
Out[8]:
Sunnyside      2
Bay Terrace    2
Murray Hill    2
Chelsea        2
Name: Neighborhood, dtype: int64
In [9]:
nyc_neighborhoods[nyc_neighborhoods['Neighborhood'] == 'Bay Terrace']
Out[9]:
Borough Neighborhood Latitude Longitude
175 Queens Bay Terrace 40.782843 -73.776802
235 Staten Island Bay Terrace 40.553988 -74.139166

To deal with this case, we will include the borough name in the name of these neighborhoods. For example, "Bay Terrace" neighborhood which is located in "Staten Island" borough will be named "Bay Terrace, Staten Island" and the one in "Queens" will be named "Bay Terrace, Queens":

In [10]:
for i in range(nyc_neighborhoods.shape[0]):
    nyn_ = nyc_neighborhoods.loc[i, 'Neighborhood']
    if nyc_neighborhoods[nyc_neighborhoods['Neighborhood'] == nyn_].shape[0] > 1:
        ind_ = nyc_neighborhoods[nyc_neighborhoods['Neighborhood'] == nyn_].index.tolist()
        for j in ind_:
            nyb__ = nyc_neighborhoods.loc[j, 'Borough']
            nyc_neighborhoods.loc[j, 'Neighborhood'] = nyn_ + ', ' + nyb__
In [11]:
nyc_neighborhoods[nyc_neighborhoods['Neighborhood'].str.startswith('Bay Terrace')]
Out[11]:
Borough Neighborhood Latitude Longitude
175 Queens Bay Terrace, Queens 40.782843 -73.776802
235 Staten Island Bay Terrace, Staten Island 40.553988 -74.139166

Using geopy Library to get the Coordinates of New York City

In [12]:
address    = 'New York City, NY'
geolocator = Nominatim(user_agent="ny_explorer")

location   = geolocator.geocode(address)
latitude   = location.latitude
longitude  = location.longitude
print('The geograpical coordinate of New York City are {}, {}.'.format(latitude, longitude))
The geograpical coordinate of New York City are 40.7127281, -74.0060152.

Creating a Map of New York City with neighborhoods Superimposed on Top

In [13]:
nyc_borough_list = nyc_neighborhoods['Borough'].unique()
colors = {
    nyc_borough_list[0]:'red',
    nyc_borough_list[1]:'blue',
    nyc_borough_list[2]:'yellow',
    nyc_borough_list[3]:'green',
    nyc_borough_list[4]:'orange'}
print(colors)

# create map of New York using latitude and longitude values
map_newyork = folium.Map(location = [latitude, longitude], 
                         zoom_start = 10, 
                         min_zoom   = 9, 
                         max_zoom   = 11)

# add markers of neighborhoods to map
for lat, lng, borough, neighborhood in zip(nyc_neighborhoods['Latitude'], 
                                           nyc_neighborhoods['Longitude'], 
                                           nyc_neighborhoods['Borough'], 
                                           nyc_neighborhoods['Neighborhood']):
    label = '{}, {}'.format(neighborhood, borough)
    label = folium.Popup(label, parse_html=True)
    folium.CircleMarker(
        [lat, lng],
        radius = 3,
        popup  = label,
        weight = 2,
        color  = 'black',
        fill   = True,
        fill_color   = colors[borough],
        fill_opacity = 0.7,
        parse_html   = False
    ).add_to(map_newyork) 
    
map_newyork
{'Bronx': 'red', 'Manhattan': 'blue', 'Brooklyn': 'yellow', 'Queens': 'green', 'Staten Island': 'orange'}
Out[13]:
Make this Notebook Trusted to load map: File -> Trust Notebook

1.2 NYC Venue Data (Latitude, Longitude, Category)

Downloading and saving Venue Data For New York City from Foursquare

In [14]:
# (We only need to do this ONCE.)
# # Foursquare API credentials
# CLIENT_ID     = '0MUGDYKOTRADEMKPQAGC04ERDG2QGPNSCBU0NJUF5TCWDZ3F' 
# CLIENT_SECRET = 'ABAH0NCFR5UCPDIYYT5332EWLB2KM1TWPWMH2VN5414UPSOL' 
# VERSION = '20201124'

# LIMIT = 100 # A default Foursquare API limit value

# print('Your credentails:')
# print('CLIENT_ID: ' + CLIENT_ID)
# print('CLIENT_SECRET:' + CLIENT_SECRET)
In [15]:
# def getNearbyVenues(names, latitudes, longitudes, radius=500, LIMIT=100):
#     """
#     A function that retrieves information about venues in each neighborhood.
#     It takes as input a list of the names of the neighborhoods, a list of 
#     their latitudes, and a list of their longitudes.
#     It returns a dataframe with information about each neighborhood and its venues.
#     """
    
#     venues_list=[]
#     for name, lat, lng in zip(names, latitudes, longitudes):
#         print('+', end='')
            
#         # create the API request URL
#         url = ('https://api.foursquare.com/v2/venues/search?'
#                '&client_id={}'
#                '&client_secret={}'
#                '&v={}'
#                '&ll={},{}&intent=browse&radius={}&limit={}'
#                .format(CLIENT_ID, 
#                        CLIENT_SECRET, 
#                        VERSION, 
#                        lat, lng, radius,LIMIT))
        
            
#         # make the GET request
#         results = None
#         while results is None:
#             try:
#                 results = requests.get(url).json()["response"]["venues"]
#             except:
#                 print('X', end='')
#                 results = None
        
#         # return only relevant information for each nearby venue
#         venues_list.append([(name, lat, lng, v['name'], v['location']['lat'], 
#                              v['location']['lng'], v['categories'][0]['name']) 
#                             for v in results if len(v['categories']) > 0])

#     nearby_venues = pd.DataFrame([item for venue_list in venues_list for item in venue_list])
#     nearby_venues.columns = ['Neighborhood', 'Neighborhood Latitude', 'Neighborhood Longitude', 
#                              'Venue', 'Venue Latitude', 'Venue Longitude', 'Venue Category']
    
#     return(nearby_venues)
In [16]:
# df_nyc_nbhd = getNearbyVenues(names      = nyc_neighborhoods['Neighborhood'],
#                              latitudes  = nyc_neighborhoods['Latitude'],
#                              longitudes = nyc_neighborhoods['Longitude']
#                             )
# df_nyc_nbhd.to_csv('./capstone_data/nyc_venues.csv',index=False)

Loading the saved data into a pandas dataframe

In [17]:
nyc_venues = pd.read_csv('./capstone_data/nyc_venues.csv')

# Removing some records 
nyc_venues = nyc_venues[~nyc_venues['Venue Category'].isin([
    'Building', 'Office', 'Bus Line', 'Bus Station', 'Bus Stop', 'Road'])]
print(nyc_venues.shape)
nyc_venues.head()
(23776, 7)
Out[17]:
Neighborhood Neighborhood Latitude Neighborhood Longitude Venue Venue Latitude Venue Longitude Venue Category
0 Wakefield 40.894705 -73.847201 Shell 40.894187 -73.845862 Gas Station
1 Wakefield 40.894705 -73.847201 Pitman Deli 40.896744 -73.844398 Food
2 Wakefield 40.894705 -73.847201 Julio C Barber Shop 2 40.892648 -73.855725 Salon / Barbershop
3 Wakefield 40.894705 -73.847201 Lollipops Gelato 40.894123 -73.845892 Dessert Shop
5 Wakefield 40.894705 -73.847201 Shell 40.891771 -73.853213 Gas Station

Let's check how many venues were returned for each neighborhood

In [18]:
nyc_venues.groupby('Neighborhood').size()
Out[18]:
Neighborhood
Allerton                      84
Annadale                      77
Arden Heights                 69
Arlington                     72
Arrochar                      77
Arverne                       85
Astoria                       75
Astoria Heights               66
Auburndale                    63
Bath Beach                    86
Battery Park City             87
Bay Ridge                     87
Bay Terrace, Queens           81
Bay Terrace, Staten Island    78
Baychester                    82
Bayside                       84
Bayswater                     80
Bedford Park                  68
Bedford Stuyvesant            86
Beechhurst                    90
Bellaire                      79
Belle Harbor                  83
Bellerose                     80
Belmont                       62
Bensonhurst                   84
Bergen Beach                  79
Blissville                    77
Bloomfield                    73
Boerum Hill                   90
Borough Park                  35
Breezy Point                  72
Briarwood                     75
Brighton Beach                90
Broad Channel                 88
Broadway Junction             69
Bronxdale                     70
Brooklyn Heights              39
Brookville                    67
Brownsville                   85
Bulls Head                    73
Bushwick                      68
Butler Manor                  72
Cambria Heights               79
Canarsie                      68
Carnegie Hill                 86
Carroll Gardens               83
Castle Hill                   79
Castleton Corners             77
Central Harlem                85
Charleston                    83
Chelsea, Manhattan            84
Chelsea, Staten Island        82
Chinatown                     89
City Island                   87
City Line                     88
Civic Center                  71
Claremont Village             77
Clason Point                  56
Clifton                       71
Clinton                       80
Clinton Hill                  87
Co-op City                    74
Cobble Hill                   74
College Point                 86
Concord                       61
Concourse                     86
Concourse Village             79
Coney Island                  74
Corona                        92
Country Club                  74
Crown Heights                 88
Cypress Hills                 87
Ditmas Park                   91
Dongan Hills                  68
Douglaston                    84
Downtown                      99
Dumbo                         80
Dyker Heights                 57
East Elmhurst                 79
East Flatbush                 84
East Harlem                   78
East New York                 74
East Tremont                  89
East Village                  86
East Williamsburg             89
Eastchester                   80
Edenwald                      62
Edgemere                      78
Edgewater Park                82
Egbertville                   70
Elm Park                      70
Elmhurst                      68
Eltingville                   87
Emerson Hill                  68
Erasmus                       37
Far Rockaway                  83
Fieldston                     81
Financial District            66
Flatbush                      89
Flatiron                      73
Flatlands                     82
Floral Park                   83
Flushing                      89
Fordham                       79
Forest Hills                  31
Forest Hills Gardens          85
Fort Greene                   32
Fort Hamilton                 88
Fox Hills                     73
Fresh Meadows                 45
Fulton Ferry                  88
Georgetown                    93
Gerritsen Beach               83
Glen Oaks                     64
Glendale                      71
Gowanus                       72
Gramercy                      84
Graniteville                  71
Grant City                    79
Grasmere                      70
Gravesend                     85
Great Kills                   89
Greenpoint                    88
Greenridge                    62
Greenwich Village             88
Grymes Hill                   75
Hamilton Heights              85
Hammels                       88
Heartland Village             80
High  Bridge                  85
Highland Park                 61
Hillcrest                     89
Hollis                        85
Holliswood                    85
Homecrest                     89
Howard Beach                  89
Howland Hook                  80
Hudson Yards                  24
Huguenot                      75
Hunters Point                 91
Hunts Point                   62
Inwood                        93
Jackson Heights               84
Jamaica Center                82
Jamaica Estates               18
Jamaica Hills                 76
Kensington                    75
Kew Gardens                   75
Kew Gardens Hills             80
Kingsbridge                   40
Kingsbridge Heights           86
Laurelton                     80
Lefrak City                   84
Lenox Hill                    84
Lighthouse Hill               66
Lincoln Square                89
Lindenwood                    78
Little Italy                  80
Little Neck                   80
Long Island City              83
Longwood                      80
Lower East Side               78
Madison                       53
Malba                         61
Manhattan Beach               76
Manhattan Terrace             84
Manhattan Valley              10
Manhattanville                84
Manor Heights                 75
Marble Hill                   72
Marine Park                   76
Mariner's Harbor              79
Maspeth                       81
Melrose                       79
Middle Village                78
Midland Beach                 79
Midtown                       64
Midtown South                 84
Midwood                       77
Mill Basin                    75
Mill Island                   70
Morningside Heights           85
Morris Heights                83
Morris Park                   83
Morrisania                    82
Mott Haven                    80
Mount Eden                    87
Mount Hope                    78
Murray Hill, Manhattan        86
Murray Hill, Queens           95
Neponsit                      86
New Brighton                  76
New Dorp                      81
New Dorp Beach                80
New Lots                      80
New Springville               83
Noho                          83
North Corona                  83
North Riverdale               85
North Side                    90
Norwood                       89
Oakland Gardens               87
Oakwood                       70
Ocean Hill                    85
Ocean Parkway                 83
Old Town                      81
Olinville                     83
Ozone Park                    79
Paerdegat Basin               80
Park Hill                     69
Park Slope                    92
Parkchester                   87
Pelham Bay                    84
Pelham Gardens                79
Pelham Parkway                82
Pleasant Plains               80
Pomonok                       80
Port Ivory                    74
Port Morris                   73
Port Richmond                 66
Prince's Bay                  72
Prospect Heights              76
Prospect Lefferts Gardens     87
Prospect Park South           91
Queens Village                77
Queensboro Hill               82
Queensbridge                  76
Randall Manor                 79
Ravenswood                    90
Red Hook                      88
Rego Park                     82
Remsen Village                58
Richmond Hill                 83
Richmond Town                 75
Richmond Valley               93
Ridgewood                     84
Riverdale                     86
Rochdale                      84
Rockaway Beach                91
Rockaway Park                 25
Roosevelt Island              76
Rosebank                      81
Rosedale                      89
Rossville                     78
Roxbury                       87
Rugby                         87
Sandy Ground                  69
Schuylerville                 59
Sea Gate                      70
Sheepshead Bay                81
Shore Acres                   76
Silver Lake                   81
Soho                          83
Somerville                    77
Soundview                     81
South Beach                   86
South Jamaica                 76
South Ozone Park              75
South Side                    92
Springfield Gardens           64
Spuyten Duyvil                72
St. Albans                    86
St. George                    85
Stapleton                     76
Starrett City                 67
Steinway                      85
Stuyvesant Town               53
Sunnyside Gardens             83
Sunnyside, Queens             84
Sunnyside, Staten Island      89
Sunset Park                   85
Sutton Place                  80
Throgs Neck                   74
Todt Hill                     79
Tompkinsville                 87
Tottenville                   63
Travis                        75
Tribeca                       84
Tudor City                    84
Turtle Bay                    67
Unionport                     89
University Heights            91
Upper East Side               80
Upper West Side               83
Utopia                        67
Van Nest                      85
Vinegar Hill                  76
Wakefield                     87
Washington Heights            41
Weeksville                    89
West Brighton                 87
West Farms                    71
West Village                  89
Westchester Square            86
Westerleigh                   89
Whitestone                    69
Williamsbridge                89
Williamsburg                  85
Willowbrook                   71
Windsor Terrace               50
Wingate                       81
Woodhaven                     93
Woodlawn                      83
Woodrow                       80
Woodside                      92
Yorkville                     88
dtype: int64
In [19]:
nyc_neighborhoods['Neighborhood'].unique().shape[0], nyc_venues['Neighborhood'].unique().shape[0]
Out[19]:
(306, 306)
In [20]:
# In case Foursquare does not return any venue for some neighborhoods.

nyc_excluded_neighborhoods = set(nyc_neighborhoods['Neighborhood']).difference(nyc_venues['Neighborhood'])
print(nyc_excluded_neighborhoods)
set()

Let's find out how many unique categories can be curated from all the returned venues

In [21]:
print('There are {} uniques categories.'.format(len(nyc_venues['Venue Category'].unique())))
There are 576 uniques categories.

Performing one-hot encoding on the Venue Category variable

In [22]:
# one-hot encoding
nyc_onehot = pd.get_dummies(nyc_venues[['Venue Category']], prefix="", prefix_sep="")

nyc_onehot['Neighborhood'] = nyc_venues['Neighborhood'] 

# move 'Neighborhood' column to the first column
fixed_columns = [nyc_onehot.columns[-1]] + list(nyc_onehot.columns[:-1])
nyc_onehot    = nyc_onehot[fixed_columns]

nyc_onehot.head()
Out[22]:
Neighborhood ATM Accessories Store Acupuncturist Adult Boutique Advertising Agency Afghan Restaurant African Restaurant Airport Airport Gate Airport Service Airport Terminal Airport Tram Alternative Healer American Restaurant Animal Shelter Antique Shop Arcade Arepa Restaurant Argentinian Restaurant Art Gallery Art Museum Art Studio Arts & Crafts Store Arts & Entertainment Asian Restaurant Assisted Living Astrologer Athletics & Sports Auditorium Australian Restaurant Auto Dealership Auto Garage Auto Workshop Automotive Shop BBQ Joint Baby Store Bagel Shop Baggage Claim Baggage Locker Bakery Ballroom Bank Bar Baseball Field Baseball Stadium Basketball Court Bath House Bathing Area Beach Beach Bar Bed & Breakfast Beer Bar Beer Garden Beer Store Big Box Store Bike Rental / Bike Share Bike Shop Bike Trail Bistro Board Shop Boat or Ferry Bookstore Border Crossing Botanical Garden Boutique Bowling Alley Boxing Gym Brazilian Restaurant Breakfast Spot Brewery Bridal Shop Bridge Bubble Tea Shop Buddhist Temple Buffet Burger Joint Burrito Place Business Center Business Service Butcher Cable Car Cafeteria Café Cajun / Creole Restaurant Camera Store Campaign Office Campground Canal Candy Store Cantonese Restaurant Capitol Building Car Wash Caribbean Restaurant Carpet Store Casino Caucasian Restaurant Cemetery Check Cashing Service Cheese Shop Child Care Service Chinese Restaurant Chiropractor Chocolate Shop Church Circus City Hall Climbing Gym Clothing Store Club House Cocktail Bar Coffee Shop College & University College Academic Building College Administrative Building College Arts Building College Auditorium College Basketball Court College Bookstore College Cafeteria College Classroom College Communications Building College Football Field College Gym College Lab College Library College Math Building College Quad College Rec Center College Residence Hall College Science Building College Stadium College Technology Building College Theater College Track Colombian Restaurant Comedy Club Comfort Food Restaurant Community Center Community College Concert Hall Conference Room Construction & Landscaping Convenience Store Convention Center Cooking School Corporate Amenity Corporate Cafeteria Cosmetics Shop Costume Shop Country Dance Club Courthouse Coworking Space Credit Union Creperie Cuban Restaurant Cultural Center Cupcake Shop Currency Exchange Cycle Studio Dance Studio Daycare Deli / Bodega Dentist's Office Department Store Design Studio Dessert Shop Dim Sum Restaurant Diner Discount Store Distillery Distribution Center Dive Bar Doctor's Office Dog Run Donut Shop Dosa Place Driving School Drugstore Dry Cleaner Dumpling Restaurant EV Charging Station Eastern European Restaurant Electronics Store Elementary School Embassy / Consulate Emergency Room Empanada Restaurant Entertainment Service Event Service Event Space Exhibit Eye Doctor Fabric Shop Factory Fair Falafel Restaurant Farm Farmers Market Fast Food Restaurant Field Filipino Restaurant Film Studio Financial or Legal Service Fire Station Fish & Chips Shop Fish Market Fishing Spot Fishing Store Flea Market Floating Market Flower Shop Food Food & Drink Shop Food Court Food Service Food Stand Food Truck Forest Fraternity House French Restaurant Fried Chicken Joint Frozen Yogurt Shop Fruit & Vegetable Store Funeral Home Furniture / Home Store Gaming Cafe Garden Garden Center Gas Station Gastropub Gay Bar General College & University General Entertainment General Travel German Restaurant Gift Shop Gluten-free Restaurant Golf Course Gourmet Shop Government Building Greek Restaurant Grocery Store Gun Range Gym Gym / Fitness Center Gym Pool Gymnastics Gym Halal Restaurant Harbor / Marina Hardware Store Hawaiian Restaurant Health & Beauty Service Health Food Store Herbs & Spices Store High School Himalayan Restaurant Hindu Temple Historic Site History Museum Hobby Shop Home Service Hookah Bar Hospital Hospital Ward Hostel Hot Dog Joint Hot Spring Hotel Hotel Bar Hotpot Restaurant Housing Development Hunan Restaurant IT Services Ice Cream Shop Indian Restaurant Indie Movie Theater Indie Theater Indoor Play Area Industrial Estate Insurance Office Internet Cafe Intersection Irish Pub Island Israeli Restaurant Italian Restaurant Japanese Curry Restaurant Japanese Restaurant Jazz Club Jewelry Store Jewish Restaurant Juice Bar Karaoke Bar Kebab Restaurant Kids Store Kingdom Hall Korean Restaurant Kosher Restaurant Lake Language School Latin American Restaurant Laundromat Laundry Service Law School Lawyer Leather Goods Store Lebanese Restaurant Library Light Rail Station Lighthouse Line / Queue Lingerie Store Liquor Store Locksmith Lounge Luggage Store Mac & Cheese Joint Malay Restaurant Market Martial Arts School Massage Studio Maternity Clinic Mattress Store Medical Center Medical Lab Medical School Mediterranean Restaurant Meeting Room Memorial Site Men's Store Mental Health Office Metro Station Mexican Restaurant Middle Eastern Restaurant Middle School Military Base Miscellaneous Shop Mobile Phone Shop Monastery Monument / Landmark Moroccan Restaurant Mosque Motel Motorcycle Shop Mountain Movie Theater Moving Target Multiplex Museum Music School Music Store Music Venue Nail Salon National Park New American Restaurant Newsstand Night Market Nightclub Nightlife Spot Non-Profit Noodle House Nursery School Opera House Optical Shop Organic Grocery Other Event Other Great Outdoors Other Nightlife Other Repair Shop Outdoor Event Space Outdoor Gym Outdoor Sculpture Outdoors & Recreation Outlet Mall Outlet Store Paella Restaurant Paintball Field Pakistani Restaurant Paper / Office Supplies Store Park Parking Pawn Shop Pedestrian Plaza Performing Arts Venue Persian Restaurant Peruvian Restaurant Pet Café Pet Service Pet Store Pharmacy Photography Lab Photography Studio Physical Therapist Piano Bar Pie Shop Pier Piercing Parlor Pilates Studio Pizza Place Plane Platform Playground Plaza Poke Place Police Station Polish Restaurant Pool Pool Hall Pop-Up Shop Portuguese Restaurant Post Office Prayer Room Preschool Print Shop Private School Professional & Other Places Pub Public Art Public Bathroom Puerto Rican Restaurant Racetrack Radio Station Ramen Restaurant Real Estate Office Record Shop Recording Studio Recreation Center Recycling Facility Rehab Center Religious School Rental Car Location Rental Service Research Laboratory Residence Residential Building (Apartment / Condo) Resort Rest Area Restaurant River Rock Climbing Spot Rock Club Roller Rink Roof Deck Rugby Pitch Russian Restaurant Sake Bar Salad Place Salon / Barbershop Salsa Club Sandwich Place Sausage Shop Scenic Lookout School Sculpture Garden Seafood Restaurant Shabu-Shabu Restaurant Shanghai Restaurant Shipping Store Shoe Repair Shoe Store Shop & Service Shopping Mall Shopping Plaza Shrine Sikh Temple Skate Park Skating Rink Ski Chalet Ski Lodge Smoke Shop Smoothie Shop Snack Place Soccer Field Social Club Sorority House Soup Place South American Restaurant South Indian Restaurant Southern / Soul Food Restaurant Souvenir Shop Souvlaki Shop Spa Spanish Restaurant Speakeasy Spiritual Center Sporting Goods Shop Sports Bar Sports Club Squash Court Sri Lankan Restaurant Stables Stadium Stationery Store Steakhouse Stoop Sale Storage Facility Street Art Strip Club Student Center Summer Camp Supermarket Supplement Shop Surf Spot Sushi Restaurant Synagogue Szechuan Restaurant TV Station Taco Place Tailor Shop Taiwanese Restaurant Tanning Salon Tapas Restaurant Tattoo Parlor Taxi Tea Room Tech Startup Temple Tennis Court Tennis Stadium Tex-Mex Restaurant Thai Restaurant Theater Theme Park Theme Park Ride / Attraction Theme Restaurant Thrift / Vintage Store Tibetan Restaurant Tiki Bar Toll Booth Toll Plaza Tour Provider Tourist Information Center Toy / Game Store Track Track Stadium Trade School Trail Trailer Park Train Train Station Transportation Service Travel & Transport Travel Agency Travel Lounge Tree Tunnel Turkish Restaurant University Urgent Care Center Vacation Rental Vape Store Varenyky restaurant Vegetarian / Vegan Restaurant Veterinarian Video Game Store Video Store Vietnamese Restaurant Vineyard Volleyball Court Voting Booth Warehouse Warehouse Store Waste Facility Watch Shop Waterfront Wedding Hall Weight Loss Center Well Whisky Bar Wine Bar Wine Shop Winery Wings Joint Women's Store Yemeni Restaurant Yoga Studio
0 Wakefield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 Wakefield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 Wakefield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 Wakefield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 Wakefield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
In [23]:
nyc_onehot.shape
Out[23]:
(23776, 577)

Grouping rows by neighborhood and taking the mean of the frequency of occurrence of each category for each neighborhood

In [24]:
nyc_grouped = nyc_onehot.groupby('Neighborhood').mean().reset_index()
nyc_grouped.head()
Out[24]:
Neighborhood ATM Accessories Store Acupuncturist Adult Boutique Advertising Agency Afghan Restaurant African Restaurant Airport Airport Gate Airport Service Airport Terminal Airport Tram Alternative Healer American Restaurant Animal Shelter Antique Shop Arcade Arepa Restaurant Argentinian Restaurant Art Gallery Art Museum Art Studio Arts & Crafts Store Arts & Entertainment Asian Restaurant Assisted Living Astrologer Athletics & Sports Auditorium Australian Restaurant Auto Dealership Auto Garage Auto Workshop Automotive Shop BBQ Joint Baby Store Bagel Shop Baggage Claim Baggage Locker Bakery Ballroom Bank Bar Baseball Field Baseball Stadium Basketball Court Bath House Bathing Area Beach Beach Bar Bed & Breakfast Beer Bar Beer Garden Beer Store Big Box Store Bike Rental / Bike Share Bike Shop Bike Trail Bistro Board Shop Boat or Ferry Bookstore Border Crossing Botanical Garden Boutique Bowling Alley Boxing Gym Brazilian Restaurant Breakfast Spot Brewery Bridal Shop Bridge Bubble Tea Shop Buddhist Temple Buffet Burger Joint Burrito Place Business Center Business Service Butcher Cable Car Cafeteria Café Cajun / Creole Restaurant Camera Store Campaign Office Campground Canal Candy Store Cantonese Restaurant Capitol Building Car Wash Caribbean Restaurant Carpet Store Casino Caucasian Restaurant Cemetery Check Cashing Service Cheese Shop Child Care Service Chinese Restaurant Chiropractor Chocolate Shop Church Circus City Hall Climbing Gym Clothing Store Club House Cocktail Bar Coffee Shop College & University College Academic Building College Administrative Building College Arts Building College Auditorium College Basketball Court College Bookstore College Cafeteria College Classroom College Communications Building College Football Field College Gym College Lab College Library College Math Building College Quad College Rec Center College Residence Hall College Science Building College Stadium College Technology Building College Theater College Track Colombian Restaurant Comedy Club Comfort Food Restaurant Community Center Community College Concert Hall Conference Room Construction & Landscaping Convenience Store Convention Center Cooking School Corporate Amenity Corporate Cafeteria Cosmetics Shop Costume Shop Country Dance Club Courthouse Coworking Space Credit Union Creperie Cuban Restaurant Cultural Center Cupcake Shop Currency Exchange Cycle Studio Dance Studio Daycare Deli / Bodega Dentist's Office Department Store Design Studio Dessert Shop Dim Sum Restaurant Diner Discount Store Distillery Distribution Center Dive Bar Doctor's Office Dog Run Donut Shop Dosa Place Driving School Drugstore Dry Cleaner Dumpling Restaurant EV Charging Station Eastern European Restaurant Electronics Store Elementary School Embassy / Consulate Emergency Room Empanada Restaurant Entertainment Service Event Service Event Space Exhibit Eye Doctor Fabric Shop Factory Fair Falafel Restaurant Farm Farmers Market Fast Food Restaurant Field Filipino Restaurant Film Studio Financial or Legal Service Fire Station Fish & Chips Shop Fish Market Fishing Spot Fishing Store Flea Market Floating Market Flower Shop Food Food & Drink Shop Food Court Food Service Food Stand Food Truck Forest Fraternity House French Restaurant Fried Chicken Joint Frozen Yogurt Shop Fruit & Vegetable Store Funeral Home Furniture / Home Store Gaming Cafe Garden Garden Center Gas Station Gastropub Gay Bar General College & University General Entertainment General Travel German Restaurant Gift Shop Gluten-free Restaurant Golf Course Gourmet Shop Government Building Greek Restaurant Grocery Store Gun Range Gym Gym / Fitness Center Gym Pool Gymnastics Gym Halal Restaurant Harbor / Marina Hardware Store Hawaiian Restaurant Health & Beauty Service Health Food Store Herbs & Spices Store High School Himalayan Restaurant Hindu Temple Historic Site History Museum Hobby Shop Home Service Hookah Bar Hospital Hospital Ward Hostel Hot Dog Joint Hot Spring Hotel Hotel Bar Hotpot Restaurant Housing Development Hunan Restaurant IT Services Ice Cream Shop Indian Restaurant Indie Movie Theater Indie Theater Indoor Play Area Industrial Estate Insurance Office Internet Cafe Intersection Irish Pub Island Israeli Restaurant Italian Restaurant Japanese Curry Restaurant Japanese Restaurant Jazz Club Jewelry Store Jewish Restaurant Juice Bar Karaoke Bar Kebab Restaurant Kids Store Kingdom Hall Korean Restaurant Kosher Restaurant Lake Language School Latin American Restaurant Laundromat Laundry Service Law School Lawyer Leather Goods Store Lebanese Restaurant Library Light Rail Station Lighthouse Line / Queue Lingerie Store Liquor Store Locksmith Lounge Luggage Store Mac & Cheese Joint Malay Restaurant Market Martial Arts School Massage Studio Maternity Clinic Mattress Store Medical Center Medical Lab Medical School Mediterranean Restaurant Meeting Room Memorial Site Men's Store Mental Health Office Metro Station Mexican Restaurant Middle Eastern Restaurant Middle School Military Base Miscellaneous Shop Mobile Phone Shop Monastery Monument / Landmark Moroccan Restaurant Mosque Motel Motorcycle Shop Mountain Movie Theater Moving Target Multiplex Museum Music School Music Store Music Venue Nail Salon National Park New American Restaurant Newsstand Night Market Nightclub Nightlife Spot Non-Profit Noodle House Nursery School Opera House Optical Shop Organic Grocery Other Event Other Great Outdoors Other Nightlife Other Repair Shop Outdoor Event Space Outdoor Gym Outdoor Sculpture Outdoors & Recreation Outlet Mall Outlet Store Paella Restaurant Paintball Field Pakistani Restaurant Paper / Office Supplies Store Park Parking Pawn Shop Pedestrian Plaza Performing Arts Venue Persian Restaurant Peruvian Restaurant Pet Café Pet Service Pet Store Pharmacy Photography Lab Photography Studio Physical Therapist Piano Bar Pie Shop Pier Piercing Parlor Pilates Studio Pizza Place Plane Platform Playground Plaza Poke Place Police Station Polish Restaurant Pool Pool Hall Pop-Up Shop Portuguese Restaurant Post Office Prayer Room Preschool Print Shop Private School Professional & Other Places Pub Public Art Public Bathroom Puerto Rican Restaurant Racetrack Radio Station Ramen Restaurant Real Estate Office Record Shop Recording Studio Recreation Center Recycling Facility Rehab Center Religious School Rental Car Location Rental Service Research Laboratory Residence Residential Building (Apartment / Condo) Resort Rest Area Restaurant River Rock Climbing Spot Rock Club Roller Rink Roof Deck Rugby Pitch Russian Restaurant Sake Bar Salad Place Salon / Barbershop Salsa Club Sandwich Place Sausage Shop Scenic Lookout School Sculpture Garden Seafood Restaurant Shabu-Shabu Restaurant Shanghai Restaurant Shipping Store Shoe Repair Shoe Store Shop & Service Shopping Mall Shopping Plaza Shrine Sikh Temple Skate Park Skating Rink Ski Chalet Ski Lodge Smoke Shop Smoothie Shop Snack Place Soccer Field Social Club Sorority House Soup Place South American Restaurant South Indian Restaurant Southern / Soul Food Restaurant Souvenir Shop Souvlaki Shop Spa Spanish Restaurant Speakeasy Spiritual Center Sporting Goods Shop Sports Bar Sports Club Squash Court Sri Lankan Restaurant Stables Stadium Stationery Store Steakhouse Stoop Sale Storage Facility Street Art Strip Club Student Center Summer Camp Supermarket Supplement Shop Surf Spot Sushi Restaurant Synagogue Szechuan Restaurant TV Station Taco Place Tailor Shop Taiwanese Restaurant Tanning Salon Tapas Restaurant Tattoo Parlor Taxi Tea Room Tech Startup Temple Tennis Court Tennis Stadium Tex-Mex Restaurant Thai Restaurant Theater Theme Park Theme Park Ride / Attraction Theme Restaurant Thrift / Vintage Store Tibetan Restaurant Tiki Bar Toll Booth Toll Plaza Tour Provider Tourist Information Center Toy / Game Store Track Track Stadium Trade School Trail Trailer Park Train Train Station Transportation Service Travel & Transport Travel Agency Travel Lounge Tree Tunnel Turkish Restaurant University Urgent Care Center Vacation Rental Vape Store Varenyky restaurant Vegetarian / Vegan Restaurant Veterinarian Video Game Store Video Store Vietnamese Restaurant Vineyard Volleyball Court Voting Booth Warehouse Warehouse Store Waste Facility Watch Shop Waterfront Wedding Hall Weight Loss Center Well Whisky Bar Wine Bar Wine Shop Winery Wings Joint Women's Store Yemeni Restaurant Yoga Studio
0 Allerton 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.023810 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.011905 0.0 0.0 0.0 0.0 0.0 0.0 0.011905 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011905 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.035714 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.023810 0.02381 0.0 0.000000 0.0 0.0 0.0 0.011905 0.000000 0.011905 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.023810 0.011905 0.000000 0.0 0.0 0.0 0.000000 0.011905 0.0 0.0 0.0 0.023810 0.0 0.011905 0.0 0.0 0.0 0.011905 0.0 0.0 0.0 0.02381 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011905 0.000000 0.0 0.0 0.023810 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.035714 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.011905 0.0 0.0 0.023810 0.000000 0.000000 0.000000 0.0 0.035714 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.011905 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.011905 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.011905 0.011905 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011905 0.0 0.0 0.011905 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.011905 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.059524 0.0 0.011905 0.0 0.0 0.011905 0.0 0.0 0.0 0.0 0.011905 0.0 0.011905 0.0 0.0 0.0 0.011905 0.011905 0.0 0.0 0.0 0.011905 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.011905 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.011905 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.035714 0.0 0.011905 0.0 0.000000 0.0 0.0 0.011905 0.000000 0.0 0.0 0.0 0.0 0.011905 0.0 0.0 0.0 0.0 0.011905 0.011905 0.000000 0.011905 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.035714 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.035714 0.0 0.0 0.011905 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.011905 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.071429 0.0 0.000000 0.0 0.000000 0.011905 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.023810 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.011905 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0
1 Annadale 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.038961 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.025974 0.0 0.0 0.025974 0.0 0.012987 0.025974 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.012987 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.012987 0.0 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.000000 0.012987 0.012987 0.000000 0.0 0.0 0.0 0.012987 0.000000 0.0 0.0 0.0 0.025974 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.00000 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.012987 0.0 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.012987 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.025974 0.0 0.000000 0.0 0.025974 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012987 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.012987 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 0.0 0.012987 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.038961 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.012987 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012987 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.025974 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.077922 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.025974 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.025974 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.077922 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012987 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.038961 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012987 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.025974 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0
2 Arden Heights 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.014493 0.0 0.0 0.000000 0.0 0.014493 0.028986 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.028986 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.00000 0.0 0.043478 0.0 0.0 0.0 0.000000 0.000000 0.028986 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.014493 0.043478 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.043478 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.00000 0.014493 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.014493 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.028986 0.0 0.0 0.000000 0.0 0.014493 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.028986 0.000000 0.0 0.014493 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.028986 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.000000 0.0 0.0 0.014493 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.028986 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.014493 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.014493 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.028986 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.014493 0.000000 0.0 0.000000 0.000000 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.028986 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.014493 0.0 0.0 0.028986 0.000000 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.0 0.0 0.000000 0.000000 0.014493 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.014493 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.057971 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.014493 0.0 0.000000 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.014493 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.014493 0.014493 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.014493 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.014493 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.014493 0.0 0.0 0.0 0.0 0.0 0.0
3 Arlington 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.027778 0.0 0.0 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.041667 0.0 0.0 0.013889 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.013889 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 0.0 0.097222 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.013889 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.013889 0.027778 0.013889 0.013889 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.013889 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.00000 0.013889 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.013889 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.013889 0.0 0.000000 0.0 0.013889 0.0 0.000000 0.0 0.0 0.000000 0.013889 0.000000 0.000000 0.0 0.000000 0.0 0.013889 0.0 0.013889 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.055556 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.013889 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.027778 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.013889 0.0 0.013889 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.027778 0.0 0.000000 0.0 0.0 0.013889 0.0 0.0 0.0 0.0 0.000000 0.0 0.013889 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.013889 0.000000 0.000000 0.0 0.000000 0.0 0.013889 0.0 0.000000 0.0 0.013889 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.013889 0.000000 0.0 0.0 0.0 0.0 0.013889 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.013889 0.0 0.0 0.027778 0.0 0.0 0.0 0.013889 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.041667 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.013889 0.041667 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.041667 0.0 0.000000 0.0 0.013889 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.013889 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.013889 0.0 0.0 0.0 0.0 0.013889 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.013889 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0
4 Arrochar 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.025974 0.0 0.0 0.000000 0.0 0.000000 0.025974 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025974 0.00000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025974 0.000000 0.051948 0.012987 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.025974 0.0 0.000000 0.0 0.0 0.0 0.025974 0.0 0.0 0.0 0.00000 0.012987 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.025974 0.0 0.0 0.000000 0.0 0.038961 0.0 0.000000 0.0 0.000000 0.0 0.0 0.012987 0.000000 0.012987 0.012987 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.012987 0.0 0.000000 0.0 0.0 0.0 0.012987 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.025974 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.025974 0.0 0.012987 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.025974 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.012987 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.000000 0.012987 0.0 0.000000 0.012987 0.012987 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.0 0.0 0.0 0.012987 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012987 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.012987 0.000000 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.038961 0.0 0.0 0.012987 0.0 0.0 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.025974 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025974 0.0 0.012987 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.000000 0.012987 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012987 0.0 0.0 0.000000 0.000000 0.0 0.0 0.012987 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012987 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0
In [25]:
nyc_grouped.shape
Out[25]:
(306, 577)

Let's print each neighborhood along with the top 5 most common venues

In [26]:
num_top_venues = 5

for hood in nyc_grouped['Neighborhood']:
    print("----"+hood+"----")
    temp = nyc_grouped[nyc_grouped['Neighborhood'] == hood].T.reset_index()
    temp.columns = ['venue','freq']
    temp = temp.iloc[1:]
    temp['freq'] = temp['freq'].astype(float)
    temp = temp.round({'freq': 2})
    print(temp.sort_values('freq', ascending=False).reset_index(drop=True).head(num_top_venues))
    print('\n')
----Allerton----
                venue  freq
0  Salon / Barbershop  0.07
1     Laundry Service  0.06
2         Pizza Place  0.04
3         Gas Station  0.04
4          Non-Profit  0.04


----Annadale----
                 venue  freq
0          Pizza Place  0.08
1   Salon / Barbershop  0.08
2  American Restaurant  0.04
3           Nail Salon  0.04
4        Tattoo Parlor  0.04


----Arden Heights----
                         venue  freq
0  Professional & Other Places  0.06
1             Dentist's Office  0.04
2              Doctor's Office  0.04
3                       Church  0.04
4                          Bar  0.03


----Arlington----
                                      venue  freq
0                                    Church  0.10
1                            Hardware Store  0.06
2  Residential Building (Apartment / Condo)  0.04
3               Professional & Other Places  0.04
4                        Salon / Barbershop  0.04


----Arrochar----
                venue  freq
0       Deli / Bodega  0.05
1          Food Truck  0.04
2         Pizza Place  0.04
3        Liquor Store  0.03
4  Chinese Restaurant  0.03


----Arverne----
                 venue  freq
0            Surf Spot  0.06
1                 Bank  0.05
2  Housing Development  0.05
3       Sandwich Place  0.04
4           Playground  0.04


----Astoria----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.16
1                                    Lounge  0.04
2                                    Bakery  0.04
3                             Deli / Bodega  0.04
4                 Latin American Restaurant  0.03


----Astoria Heights----
                   venue  freq
0        Laundry Service  0.08
1          Deli / Bodega  0.06
2             Playground  0.03
3         General Travel  0.03
4  General Entertainment  0.03


----Auburndale----
             venue  freq
0  Automotive Shop  0.16
1            Train  0.06
2       Nail Salon  0.05
3    Deli / Bodega  0.05
4  Laundry Service  0.03


----Bath Beach----
                                      venue  freq
0                             Deli / Bodega  0.07
1                               Pizza Place  0.05
2                        Salon / Barbershop  0.03
3  Residential Building (Apartment / Condo)  0.03
4                               Gas Station  0.03


----Battery Park City----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                             Boat or Ferry  0.08
2                                      Park  0.05
3                           Harbor / Marina  0.03
4                             Metro Station  0.03


----Bay Ridge----
                                      venue  freq
0                        Salon / Barbershop  0.06
1  Residential Building (Apartment / Condo)  0.06
2                                       Spa  0.05
3                            Cosmetics Shop  0.05
4                        Italian Restaurant  0.05


----Bay Terrace, Queens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.16
1                           Doctor's Office  0.10
2                             Women's Store  0.05
3                                      Pool  0.05
4                         Elementary School  0.04


----Bay Terrace, Staten Island----
                 venue  freq
0   Italian Restaurant  0.05
1     Dentist's Office  0.04
2          Gas Station  0.04
3  Housing Development  0.04
4        Deli / Bodega  0.03


----Baychester----
                  venue  freq
0           Gas Station  0.07
1    Chinese Restaurant  0.04
2        Discount Store  0.02
3     Electronics Store  0.02
4  Gym / Fitness Center  0.02


----Bayside----
                venue  freq
0    Greek Restaurant  0.05
1  Salon / Barbershop  0.05
2     Doctor's Office  0.05
3                 Spa  0.04
4                Café  0.04


----Bayswater----
                venue  freq
0               Plane  0.09
1  Salon / Barbershop  0.04
2              Church  0.04
3         Gas Station  0.04
4     Laundry Service  0.04


----Bedford Park----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.18
1                             Deli / Bodega  0.12
2                                    Church  0.06
3                        Salon / Barbershop  0.04
4                   Fruit & Vegetable Store  0.03


----Bedford Stuyvesant----
                venue  freq
0       Deli / Bodega  0.07
1              School  0.05
2  Salon / Barbershop  0.03
3     Laundry Service  0.03
4              Church  0.03


----Beechhurst----
                  venue  freq
0    Salon / Barbershop  0.08
1                  Bank  0.04
2    Chinese Restaurant  0.04
3       Doctor's Office  0.04
4  Gym / Fitness Center  0.03


----Bellaire----
                venue  freq
0  Salon / Barbershop  0.06
1  Chinese Restaurant  0.06
2       Deli / Bodega  0.06
3         Pizza Place  0.05
4         Gas Station  0.04


----Belle Harbor----
                venue  freq
0               Beach  0.18
1            Boutique  0.05
2              School  0.05
3     Doctor's Office  0.04
4  Salon / Barbershop  0.04


----Bellerose----
                venue  freq
0    Dentist's Office  0.05
1         Pizza Place  0.04
2       Deli / Bodega  0.04
3  Salon / Barbershop  0.04
4     Automotive Shop  0.04


----Belmont----
                venue  freq
0  Salon / Barbershop  0.08
1  Italian Restaurant  0.06
2       Deli / Bodega  0.06
3              School  0.05
4                 Pub  0.03


----Bensonhurst----
                venue  freq
0     Doctor's Office  0.08
1          Nail Salon  0.06
2       Design Studio  0.04
3  Italian Restaurant  0.04
4                Park  0.04


----Bergen Beach----
                venue  freq
0     Doctor's Office  0.08
1          Playground  0.05
2  Salon / Barbershop  0.04
3    Dentist's Office  0.04
4         Event Space  0.04


----Blissville----
                                      venue  freq
0                               Gas Station  0.09
1                           Automotive Shop  0.06
2                             Deli / Bodega  0.06
3                            Hardware Store  0.06
4  Residential Building (Apartment / Condo)  0.04


----Bloomfield----
                  venue  freq
0       Doctor's Office  0.14
1        Baseball Field  0.05
2       Automotive Shop  0.05
3  Other Great Outdoors  0.04
4   Sporting Goods Shop  0.04


----Boerum Hill----
                                      venue  freq
0                        Salon / Barbershop  0.09
1                           Doctor's Office  0.04
2                                  Boutique  0.03
3                     General Entertainment  0.03
4  Residential Building (Apartment / Condo)  0.03


----Borough Park----
                       venue  freq
0                  Synagogue  0.17
1                       Bank  0.06
2             Clothing Store  0.06
3  College Academic Building  0.06
4            Doctor's Office  0.03


----Breezy Point----
       venue  freq
0      Beach  0.15
1        Bar  0.06
2     Church  0.04
3  Surf Spot  0.04
4      Trail  0.04


----Briarwood----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.15
1                             Deli / Bodega  0.05
2                                    Church  0.04
3                          Dentist's Office  0.04
4                                Playground  0.04


----Brighton Beach----
                     venue  freq
0       Salon / Barbershop  0.04
1  Fruit & Vegetable Store  0.03
2             Gourmet Shop  0.03
3  Health & Beauty Service  0.03
4        Mobile Phone Shop  0.03


----Broad Channel----
             venue  freq
0            Plane  0.08
1  Harbor / Marina  0.05
2           Church  0.03
3    Deli / Bodega  0.03
4             Park  0.03


----Broadway Junction----
                  venue  freq
0           High School  0.09
1         Metro Station  0.06
2  Other Great Outdoors  0.04
3         Deli / Bodega  0.04
4       Automotive Shop  0.04


----Bronxdale----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                           Doctor's Office  0.07
2                             Deli / Bodega  0.07
3                          Dentist's Office  0.04
4                          Fraternity House  0.03


----Brooklyn Heights----
                                      venue  freq
0                           Doctor's Office  0.21
1  Residential Building (Apartment / Condo)  0.08
2                             Women's Store  0.05
3                           Laundry Service  0.05
4                        Salon / Barbershop  0.05


----Brookville----
              venue  freq
0   Doctor's Office  0.06
1     Deli / Bodega  0.04
2              Park  0.04
3  Dentist's Office  0.03
4       Pizza Place  0.03


----Brownsville----
                                      venue  freq
0                                    Church  0.08
1  Residential Building (Apartment / Condo)  0.06
2                             Deli / Bodega  0.06
3                                    School  0.05
4                       Housing Development  0.05


----Bulls Head----
              venue  freq
0   Doctor's Office  0.11
1       Pizza Place  0.07
2              Bank  0.05
3  Dentist's Office  0.04
4            Church  0.04


----Bushwick----
                                      venue  freq
0                    Thrift / Vintage Store  0.07
1                               Coffee Shop  0.06
2  Residential Building (Apartment / Condo)  0.06
3                             Deli / Bodega  0.06
4                                       Bar  0.04


----Butler Manor----
                venue  freq
0  Italian Restaurant  0.08
1                Park  0.04
2              School  0.04
3      Baseball Field  0.04
4               Beach  0.04


----Cambria Heights----
                  venue  freq
0       Doctor's Office  0.10
1  Caribbean Restaurant  0.09
2    Salon / Barbershop  0.09
3        Cosmetics Shop  0.05
4                Lounge  0.04


----Canarsie----
                  venue  freq
0    Salon / Barbershop  0.13
1  Caribbean Restaurant  0.09
2    Chinese Restaurant  0.06
3         Deli / Bodega  0.04
4       Doctor's Office  0.04


----Carnegie Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                               Event Space  0.05
2                        Salon / Barbershop  0.05
3                                       Spa  0.03
4                        Mexican Restaurant  0.03


----Carroll Gardens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.06
1                                Food Truck  0.05
2                             Deli / Bodega  0.05
3                           Laundry Service  0.04
4                         Convenience Store  0.04


----Castle Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.05
1                                    School  0.05
2                        Spanish Restaurant  0.04
3                            Medical Center  0.04
4                            Emergency Room  0.04


----Castleton Corners----
                venue  freq
0     Doctor's Office  0.13
1              Church  0.05
2       Deli / Bodega  0.04
3  Salon / Barbershop  0.04
4    Dentist's Office  0.04


----Central Harlem----
                                      venue  freq
0                        Salon / Barbershop  0.11
1  Residential Building (Apartment / Condo)  0.07
2                                  Mountain  0.05
3                      Gym / Fitness Center  0.04
4                            Cosmetics Shop  0.02


----Charleston----
                venue  freq
0     Doctor's Office  0.08
1  Salon / Barbershop  0.04
2       Big Box Store  0.02
3    Department Store  0.02
4       Shopping Mall  0.02


----Chelsea, Manhattan----
                   venue  freq
0            High School  0.06
1          Deli / Bodega  0.04
2                 Church  0.02
3  General Entertainment  0.02
4            Music Venue  0.02


----Chelsea, Staten Island----
                venue  freq
0  Salon / Barbershop  0.04
1     Automotive Shop  0.04
2      Ice Cream Shop  0.04
3  Italian Restaurant  0.02
4         Pet Service  0.02


----Chinatown----
                venue  freq
0  Chinese Restaurant  0.10
1              Bakery  0.04
2              Bridge  0.03
3                Park  0.03
4  Athletics & Sports  0.02


----City Island----
                                      venue  freq
0                           Harbor / Marina  0.07
1                            Ice Cream Shop  0.02
2  Residential Building (Apartment / Condo)  0.02
3                        Italian Restaurant  0.02
4                                  Pharmacy  0.02


----City Line----
                venue  freq
0  Salon / Barbershop  0.09
1          Nail Salon  0.06
2  Chinese Restaurant  0.05
3  Miscellaneous Shop  0.05
4   Convenience Store  0.03


----Civic Center----
                 venue  freq
0  Government Building  0.06
1      Coworking Space  0.06
2      Doctor's Office  0.06
3           Food Truck  0.04
4      Conference Room  0.03


----Claremont Village----
                venue  freq
0  Salon / Barbershop  0.06
1      Medical Center  0.06
2         Pizza Place  0.05
3       Deli / Bodega  0.05
4  Chinese Restaurant  0.05


----Clason Point----
                 venue  freq
0                 Park  0.16
1  Housing Development  0.09
2   Salon / Barbershop  0.05
3               Lounge  0.05
4      Automotive Shop  0.04


----Clifton----
                venue  freq
0         Gas Station  0.07
1         Pizza Place  0.04
2            Hospital  0.04
3     Automotive Shop  0.04
4  Salon / Barbershop  0.04


----Clinton----
                   venue  freq
0                Theater  0.08
1             Restaurant  0.06
2        Laundry Service  0.04
3           Concert Hall  0.04
4  General Entertainment  0.04


----Clinton Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.06
1                              Liquor Store  0.05
2                             Deli / Bodega  0.05
3                        Miscellaneous Shop  0.05
4                                Restaurant  0.03


----Co-op City----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                                    School  0.07
2                      Other Great Outdoors  0.04
3                                    Church  0.04
4                      Fast Food Restaurant  0.03


----Cobble Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.12
1                      Other Great Outdoors  0.07
2                            Medical Center  0.05
3                                      Taxi  0.05
4                                Playground  0.04


----College Point----
                venue  freq
0     Automotive Shop  0.09
1                Bank  0.06
2  Mexican Restaurant  0.06
3  Salon / Barbershop  0.06
4     Doctor's Office  0.03


----Concord----
                venue  freq
0     Doctor's Office  0.10
1       Deli / Bodega  0.05
2  Chinese Restaurant  0.03
3              Bakery  0.03
4     Automotive Shop  0.03


----Concourse----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.12
1                        Salon / Barbershop  0.07
2                             Deli / Bodega  0.06
3                               Pizza Place  0.06
4                                Nail Salon  0.05


----Concourse Village----
                                      venue  freq
0                             Deli / Bodega  0.10
1  Residential Building (Apartment / Condo)  0.08
2                        Salon / Barbershop  0.06
3                        Chinese Restaurant  0.05
4                                      Park  0.04


----Coney Island----
                                      venue  freq
0                             Deli / Bodega  0.05
1                       Housing Development  0.05
2  Residential Building (Apartment / Condo)  0.05
3                            Police Station  0.04
4                            Medical Center  0.04


----Corona----
                venue  freq
0  Salon / Barbershop  0.13
1       Deli / Bodega  0.07
2  Mexican Restaurant  0.07
3              Bakery  0.03
4     Doctor's Office  0.03


----Country Club----
            venue  freq
0     Coffee Shop  0.04
1   Deli / Bodega  0.04
2     Pizza Place  0.04
3  Scenic Lookout  0.03
4      Nail Salon  0.03


----Crown Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.06
1                             Deli / Bodega  0.05
2                               Pizza Place  0.05
3                        Salon / Barbershop  0.05
4                                    Lounge  0.03


----Cypress Hills----
                       venue  freq
0         Salon / Barbershop  0.15
1                 Nail Salon  0.06
2              Deli / Bodega  0.06
3                Pizza Place  0.05
4  Latin American Restaurant  0.05


----Ditmas Park----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.21
1                             Deli / Bodega  0.07
2                        Salon / Barbershop  0.05
3                                    Church  0.04
4                                Nail Salon  0.04


----Dongan Hills----
                venue  freq
0       Deli / Bodega  0.12
1     Doctor's Office  0.10
2  Salon / Barbershop  0.06
3                 Bar  0.04
4              Church  0.04


----Douglaston----
                venue  freq
0  Salon / Barbershop  0.06
1  Italian Restaurant  0.05
2     Laundry Service  0.04
3         Pizza Place  0.04
4  Chinese Restaurant  0.04


----Downtown----
                                      venue  freq
0                                Shoe Store  0.05
1                      Gym / Fitness Center  0.04
2  Residential Building (Apartment / Condo)  0.03
3                       American Restaurant  0.03
4                                       Bar  0.02


----Dumbo----
                venue  freq
0         Art Gallery  0.10
1        Tech Startup  0.08
2          Food Stand  0.05
3  Salon / Barbershop  0.04
4          Food Truck  0.04


----Dyker Heights----
                venue  freq
0     Doctor's Office  0.12
1         Gas Station  0.07
2  Salon / Barbershop  0.07
3             Dog Run  0.05
4       Deli / Bodega  0.04


----East Elmhurst----
                venue  freq
0  Salon / Barbershop  0.11
1         Gas Station  0.05
2         Pizza Place  0.04
3          Playground  0.04
4               Plane  0.04


----East Flatbush----
                  venue  freq
0  Caribbean Restaurant  0.06
1    Salon / Barbershop  0.06
2         Deli / Bodega  0.06
3    Chinese Restaurant  0.05
4                Church  0.05


----East Harlem----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                            Clothing Store  0.04
2                               Pizza Place  0.04
3                                    Lawyer  0.03
4                                      Bank  0.03


----East New York----
                venue  freq
0  Salon / Barbershop  0.12
1       Deli / Bodega  0.09
2     Laundry Service  0.04
3              School  0.04
4  Spanish Restaurant  0.04


----East Tremont----
                venue  freq
0  Salon / Barbershop  0.13
1                Food  0.04
2      Cosmetics Shop  0.04
3          Shoe Store  0.03
4  Chinese Restaurant  0.03


----East Village----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                        Salon / Barbershop  0.07
2                       American Restaurant  0.03
3                        Miscellaneous Shop  0.03
4                            Clothing Store  0.02


----East Williamsburg----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.15
1                             Deli / Bodega  0.07
2                               Art Gallery  0.06
3                               Music Venue  0.06
4                         Convenience Store  0.04


----Eastchester----
                  venue  freq
0       Automotive Shop  0.26
1  Caribbean Restaurant  0.05
2         Deli / Bodega  0.04
3           Gas Station  0.04
4               Factory  0.04


----Edenwald----
                                      venue  freq
0                        Salon / Barbershop  0.10
1  Residential Building (Apartment / Condo)  0.10
2                              Liquor Store  0.05
3                                    Church  0.05
4                             Deli / Bodega  0.05


----Edgemere----
                                      venue  freq
0                            Medical Center  0.06
1  Residential Building (Apartment / Condo)  0.05
2                                   Dog Run  0.05
3                                     Beach  0.05
4                             Deli / Bodega  0.04


----Edgewater Park----
                venue  freq
0  Italian Restaurant  0.05
1       Deli / Bodega  0.05
2            Pharmacy  0.04
3  Chinese Restaurant  0.04
4      Medical Center  0.04


----Egbertville----
              venue  freq
0   Doctor's Office  0.10
1   Automotive Shop  0.04
2  Dentist's Office  0.04
3             Trail  0.04
4              Park  0.04


----Elm Park----
                venue  freq
0       Deli / Bodega  0.11
1         Pizza Place  0.04
2          Restaurant  0.04
3  Salon / Barbershop  0.04
4     Laundry Service  0.03


----Elmhurst----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.13
1                           Doctor's Office  0.09
2                           Thai Restaurant  0.07
3                           Bubble Tea Shop  0.06
4                              Optical Shop  0.04


----Eltingville----
                venue  freq
0  Salon / Barbershop  0.06
1          Nail Salon  0.05
2  Italian Restaurant  0.03
3     Automotive Shop  0.03
4             Butcher  0.03


----Emerson Hill----
                                      venue  freq
0                           Doctor's Office  0.31
1                            Medical Center  0.04
2                                    Church  0.04
3  Residential Building (Apartment / Condo)  0.04
4                           College Library  0.03


----Erasmus----
                   venue  freq
0     Salon / Barbershop  0.19
1                 Bakery  0.11
2   Caribbean Restaurant  0.11
3  General Entertainment  0.05
4                    Bar  0.05


----Far Rockaway----
                venue  freq
0  Salon / Barbershop  0.10
1       Deli / Bodega  0.06
2          Nail Salon  0.05
3     Automotive Shop  0.05
4  Chinese Restaurant  0.05


----Fieldston----
                                      venue  freq
0                                 Synagogue  0.06
1  Residential Building (Apartment / Condo)  0.05
2           College Administrative Building  0.05
3                              College Quad  0.04
4                 College Academic Building  0.04


----Financial District----
           venue  freq
0  Historic Site  0.06
1            Bar  0.05
2     Food Truck  0.05
3     Food Court  0.03
4    Pet Service  0.03


----Flatbush----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.18
1                        Salon / Barbershop  0.08
2                              Cocktail Bar  0.03
3                             Deli / Bodega  0.03
4                                    Lounge  0.02


----Flatiron----
                    venue  freq
0            Tech Startup  0.14
1          Clothing Store  0.05
2    Gym / Fitness Center  0.05
3     Sporting Goods Shop  0.05
4  Furniture / Home Store  0.04


----Flatlands----
                  venue  freq
0    Salon / Barbershop  0.10
1       Automotive Shop  0.07
2  Caribbean Restaurant  0.06
3              Pharmacy  0.05
4                Church  0.05


----Floral Park----
                venue  freq
0   Indian Restaurant  0.12
1     Doctor's Office  0.05
2              Lounge  0.05
3  Salon / Barbershop  0.05
4       Grocery Store  0.04


----Flushing----
                venue  freq
0                 Bar  0.09
1   Korean Restaurant  0.07
2         Karaoke Bar  0.07
3  Chinese Restaurant  0.04
4               Hotel  0.04


----Fordham----
             venue  freq
0   Clothing Store  0.08
1  Doctor's Office  0.05
2    Deli / Bodega  0.05
3             Bank  0.04
4       Nail Salon  0.04


----Forest Hills----
                                      venue  freq
0                          Dentist's Office  0.35
1                           Doctor's Office  0.23
2  Residential Building (Apartment / Condo)  0.19
3                                      Bank  0.03
4                              Tech Startup  0.03


----Forest Hills Gardens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.16
1                        Salon / Barbershop  0.06
2                                      Park  0.05
3                                    Garden  0.04
4                                    Church  0.04


----Fort Greene----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.12
1                             Deli / Bodega  0.09
2                               Art Gallery  0.06
3                  Bike Rental / Bike Share  0.03
4                                Taco Place  0.03


----Fort Hamilton----
                                      venue  freq
0                           Doctor's Office  0.12
1  Residential Building (Apartment / Condo)  0.07
2                               Pizza Place  0.06
3                           Laundry Service  0.05
4                        Salon / Barbershop  0.05


----Fox Hills----
                                      venue  freq
0               Professional & Other Places  0.05
1                        Chinese Restaurant  0.05
2  Residential Building (Apartment / Condo)  0.05
3                       Housing Development  0.04
4                                Non-Profit  0.03


----Fresh Meadows----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                                    School  0.07
2                        Chinese Restaurant  0.04
3                           Laundry Service  0.04
4                        Salon / Barbershop  0.04


----Fulton Ferry----
                 venue  freq
0           Food Truck  0.09
1          Pizza Place  0.07
2  American Restaurant  0.06
3                 Park  0.06
4        Boat or Ferry  0.05


----Georgetown----
                venue  freq
0     Doctor's Office  0.12
1                Bank  0.06
2      Medical Center  0.03
3  Chinese Restaurant  0.03
4          Kids Store  0.02


----Gerritsen Beach----
                 venue  freq
0                  Bar  0.05
1          Gas Station  0.05
2  Housing Development  0.05
3            Bike Shop  0.04
4       Ice Cream Shop  0.04


----Glen Oaks----
                                      venue  freq
0                                  Hospital  0.08
1                           Laundry Service  0.05
2                                      Bank  0.05
3                                Playground  0.05
4  Residential Building (Apartment / Condo)  0.03


----Glendale----
                venue  freq
0     Doctor's Office  0.13
1       Deli / Bodega  0.08
2  Salon / Barbershop  0.04
3              Church  0.04
4  Chinese Restaurant  0.04


----Gowanus----
             venue  freq
0      Art Gallery  0.08
1    Design Studio  0.07
2  Coworking Space  0.06
3    Metro Station  0.04
4     Tech Startup  0.04


----Gramercy----
                                      venue  freq
0                           Doctor's Office  0.15
1  Residential Building (Apartment / Condo)  0.11
2                            Medical Center  0.06
3                          Dentist's Office  0.05
4                        Salon / Barbershop  0.05


----Graniteville----
               venue  freq
0         Nail Salon  0.04
1   Dentist's Office  0.04
2    Doctor's Office  0.04
3    Automotive Shop  0.03
4  Elementary School  0.03


----Grant City----
                  venue  freq
0       Doctor's Office  0.06
1      Asian Restaurant  0.05
2        Cosmetics Shop  0.05
3            Nail Salon  0.04
4  Fast Food Restaurant  0.04


----Grasmere----
                                      venue  freq
0                           Doctor's Office  0.06
1  Residential Building (Apartment / Condo)  0.04
2                        Chinese Restaurant  0.03
3                                      Food  0.03
4                               Pizza Place  0.03


----Gravesend----
                    venue  freq
0           Deli / Bodega  0.06
1         Automotive Shop  0.06
2             Pizza Place  0.04
3  Furniture / Home Store  0.04
4      Salon / Barbershop  0.04


----Great Kills----
                venue  freq
0  Salon / Barbershop  0.10
1     Doctor's Office  0.06
2          Nail Salon  0.04
3         Pizza Place  0.04
4  Italian Restaurant  0.03


----Greenpoint----
                                      venue  freq
0                           Doctor's Office  0.05
1                             Deli / Bodega  0.05
2                                   Butcher  0.05
3  Residential Building (Apartment / Condo)  0.03
4                               Medical Lab  0.02


----Greenridge----
                         venue  freq
0              Doctor's Office  0.16
1             Dentist's Office  0.05
2  Professional & Other Places  0.05
3                      Parking  0.03
4              Laundry Service  0.03


----Greenwich Village----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                                      Taxi  0.09
2                               Art Gallery  0.07
3                        Salon / Barbershop  0.05
4                            Clothing Store  0.03


----Grymes Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                                    Church  0.05
2           College Administrative Building  0.05
3                      College & University  0.04
4                                   Dog Run  0.04


----Hamilton Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.13
1                        Salon / Barbershop  0.09
2                             Deli / Bodega  0.05
3                                       Bar  0.04
4                           Laundry Service  0.04


----Hammels----
                                      venue  freq
0                                     Beach  0.17
1  Residential Building (Apartment / Condo)  0.09
2                                    Church  0.07
3                                    Bakery  0.02
4                           Automotive Shop  0.02


----Heartland Village----
                         venue  freq
0              Doctor's Office  0.10
1             Dentist's Office  0.04
2                   Bagel Shop  0.04
3  Professional & Other Places  0.04
4           Salon / Barbershop  0.04


----High  Bridge----
                                      venue  freq
0                        Salon / Barbershop  0.08
1  Residential Building (Apartment / Condo)  0.07
2                             Deli / Bodega  0.06
3                                  Pharmacy  0.06
4                           Laundry Service  0.05


----Highland Park----
                venue  freq
0  Salon / Barbershop  0.11
1              Church  0.08
2       Moving Target  0.05
3     Laundry Service  0.05
4        Liquor Store  0.05


----Hillcrest----
                          venue  freq
0     College Academic Building  0.06
1  General College & University  0.04
2                Student Center  0.03
3             College Classroom  0.03
4             College Cafeteria  0.03


----Hollis----
                  venue  freq
0    Salon / Barbershop  0.11
1       Automotive Shop  0.05
2  Caribbean Restaurant  0.05
3                Church  0.04
4       Laundry Service  0.04


----Holliswood----
                                      venue  freq
0                           Doctor's Office  0.09
1  Residential Building (Apartment / Condo)  0.06
2                               Gas Station  0.06
3                          Dentist's Office  0.05
4                        Salon / Barbershop  0.05


----Homecrest----
                         venue  freq
0           Salon / Barbershop  0.10
1           Chinese Restaurant  0.08
2             Asian Restaurant  0.04
3                       Bakery  0.03
4  Eastern European Restaurant  0.03


----Howard Beach----
                venue  freq
0  Salon / Barbershop  0.07
1  Italian Restaurant  0.06
2            Pharmacy  0.03
3                Café  0.02
4                 Gym  0.02


----Howland Hook----
             venue  freq
0    Boat or Ferry  0.08
1             Food  0.06
2          Factory  0.05
3              Bar  0.04
4  Automotive Shop  0.04


----Hudson Yards----
                    venue  freq
0  Furniture / Home Store  0.12
1          Medical Center  0.12
2              Food Truck  0.08
3              Bagel Shop  0.04
4              Donut Shop  0.04


----Huguenot----
                  venue  freq
0       Doctor's Office  0.05
1    Salon / Barbershop  0.05
2        Ice Cream Shop  0.04
3         Deli / Bodega  0.04
4  Other Great Outdoors  0.04


----Hunters Point----
                venue  freq
0       Deli / Bodega  0.05
1  Salon / Barbershop  0.04
2               Plaza  0.03
3         Yoga Studio  0.02
4                 Spa  0.02


----Hunts Point----
             venue  freq
0  Automotive Shop  0.16
1          Factory  0.08
2           School  0.05
3             Food  0.05
4      Pizza Place  0.05


----Inwood----
                 venue  freq
0        Deli / Bodega  0.05
1   Salon / Barbershop  0.05
2      Laundry Service  0.04
3           Nail Salon  0.04
4  Government Building  0.04


----Jackson Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.18
1                          Dentist's Office  0.07
2                           Doctor's Office  0.06
3                 Latin American Restaurant  0.04
4                                   Parking  0.04


----Jamaica Center----
                 venue  freq
0     Department Store  0.05
1       Clothing Store  0.05
2   Salon / Barbershop  0.05
3  Government Building  0.04
4           Kids Store  0.04


----Jamaica Estates----
                          venue  freq
0                        Church  0.11
1                        School  0.11
2               Coworking Space  0.06
3  General College & University  0.06
4                   High School  0.06


----Jamaica Hills----
                                      venue  freq
0                        Salon / Barbershop  0.08
1                             Grocery Store  0.07
2                         Indian Restaurant  0.07
3  Residential Building (Apartment / Condo)  0.05
4                          Dentist's Office  0.04


----Kensington----
                venue  freq
0       Grocery Store  0.07
1                Bank  0.05
2     Doctor's Office  0.04
3  Mexican Restaurant  0.04
4          Food Truck  0.04


----Kew Gardens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                           Doctor's Office  0.08
2                           Laundry Service  0.04
3                                      Taxi  0.04
4                                 Synagogue  0.04


----Kew Gardens Hills----
               venue  freq
0    Doctor's Office  0.05
1   Dentist's Office  0.05
2               Bank  0.05
3             School  0.04
4  Convenience Store  0.04


----Kingsbridge----
                venue  freq
0     Laundry Service  0.08
1                Bank  0.05
2  Salon / Barbershop  0.05
3            Boutique  0.05
4          Print Shop  0.02


----Kingsbridge Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                        Salon / Barbershop  0.07
2                               Pizza Place  0.06
3                             Deli / Bodega  0.05
4                        Mexican Restaurant  0.05


----Laurelton----
                  venue  freq
0  Caribbean Restaurant  0.06
1    Salon / Barbershop  0.06
2           Gas Station  0.05
3                Church  0.05
4         Deli / Bodega  0.04


----Lefrak City----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.20
1                             Deli / Bodega  0.07
2                           Laundry Service  0.07
3                        Salon / Barbershop  0.05
4                           Cultural Center  0.05


----Lenox Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                        Salon / Barbershop  0.06
2                                Nail Salon  0.04
3                               Art Gallery  0.04
4                           Doctor's Office  0.04


----Lighthouse Hill----
                venue  freq
0      History Museum  0.06
1  Italian Restaurant  0.06
2              Church  0.05
3         Gas Station  0.03
4                Park  0.03


----Lincoln Square----
                                      venue  freq
0                                   Theater  0.08
1                     Performing Arts Venue  0.06
2                               High School  0.06
3                               Opera House  0.04
4  Residential Building (Apartment / Condo)  0.04


----Lindenwood----
                                      venue  freq
0                           Doctor's Office  0.17
1                          Dentist's Office  0.08
2  Residential Building (Apartment / Condo)  0.06
3                                      Bank  0.05
4                             Deli / Bodega  0.04


----Little Italy----
                venue  freq
0  Italian Restaurant  0.28
1  Salon / Barbershop  0.05
2          Smoke Shop  0.04
3           Gift Shop  0.04
4        Gourmet Shop  0.04


----Little Neck----
                venue  freq
0  Chinese Restaurant  0.05
1  Salon / Barbershop  0.05
2              School  0.04
3   Korean Restaurant  0.04
4                Food  0.04


----Long Island City----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                             Deli / Bodega  0.06
2                                      Café  0.04
3                            Sandwich Place  0.04
4                               Pizza Place  0.04


----Longwood----
                venue  freq
0         Pizza Place  0.08
1     Automotive Shop  0.06
2               Train  0.06
3  Mexican Restaurant  0.05
4       Grocery Store  0.04


----Lower East Side----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.19
1                             Deli / Bodega  0.06
2                       Housing Development  0.06
3                  Bike Rental / Bike Share  0.04
4                               Art Gallery  0.04


----Madison----
                                      venue  freq
0                           Doctor's Office  0.13
1  Residential Building (Apartment / Condo)  0.09
2                                 Synagogue  0.09
3                          Dentist's Office  0.08
4                               High School  0.04


----Malba----
                venue  freq
0                Park  0.07
1           Rock Club  0.03
2          Food Truck  0.03
3  Chinese Restaurant  0.03
4          Nail Salon  0.03


----Manhattan Beach----
                venue  freq
0     Harbor / Marina  0.12
1       Boat or Ferry  0.12
2        Dessert Shop  0.04
3  Turkish Restaurant  0.04
4             Dog Run  0.03


----Manhattan Terrace----
                                      venue  freq
0                           Doctor's Office  0.12
1  Residential Building (Apartment / Condo)  0.07
2                          Dentist's Office  0.07
3                       Housing Development  0.05
4                                   Parking  0.05


----Manhattan Valley----
                   venue  freq
0     Salon / Barbershop   0.2
1          Deli / Bodega   0.2
2           Trailer Park   0.1
3        Laundry Service   0.1
4  Check Cashing Service   0.1


----Manhattanville----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1           College Administrative Building  0.05
2              General College & University  0.04
3                        Salon / Barbershop  0.04
4                                University  0.04


----Manor Heights----
                venue  freq
0     Laundry Service  0.04
1     Doctor's Office  0.04
2          Donut Shop  0.04
3        Liquor Store  0.04
4  Miscellaneous Shop  0.03


----Marble Hill----
                                      venue  freq
0                             Deli / Bodega  0.08
1                        Salon / Barbershop  0.07
2                               High School  0.06
3  Residential Building (Apartment / Condo)  0.04
4                                    Church  0.04


----Marine Park----
                 venue  freq
0                 Park  0.05
1      Laundry Service  0.04
2           Nail Salon  0.04
3      Doctor's Office  0.04
4  American Restaurant  0.04


----Mariner's Harbor----
                         venue  freq
0              Automotive Shop  0.08
1                       Church  0.06
2                Deli / Bodega  0.05
3           Miscellaneous Shop  0.04
4  Professional & Other Places  0.04


----Maspeth----
                venue  freq
0         Pizza Place  0.09
1          Nail Salon  0.05
2    Dentist's Office  0.04
3  Salon / Barbershop  0.04
4                Bank  0.04


----Melrose----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                        Salon / Barbershop  0.06
2                           Doctor's Office  0.06
3                           Laundry Service  0.06
4                               High School  0.05


----Middle Village----
                venue  freq
0              Bakery  0.06
1  Chinese Restaurant  0.05
2      Cosmetics Shop  0.05
3  Salon / Barbershop  0.04
4  Miscellaneous Shop  0.03


----Midland Beach----
            venue  freq
0  Baseball Field  0.09
1  General Travel  0.08
2           Beach  0.05
3       Pet Store  0.05
4      Non-Profit  0.05


----Midtown----
                             venue  freq
0     General College & University  0.11
1  College Administrative Building  0.05
2                       Shoe Store  0.05
3              American Restaurant  0.03
4                           Mosque  0.03


----Midtown South----
                 venue  freq
0                 Taxi  0.06
1           Food Stand  0.05
2  American Restaurant  0.05
3                  Spa  0.04
4                Hotel  0.04


----Midwood----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                           Doctor's Office  0.05
2                                    Bakery  0.04
3                                 Synagogue  0.04
4                          Dentist's Office  0.03


----Mill Basin----
                venue  freq
0    Dentist's Office  0.08
1     Doctor's Office  0.05
2  Salon / Barbershop  0.05
3         Gas Station  0.05
4     Laundry Service  0.04


----Mill Island----
                       venue  freq
0            Harbor / Marina  0.04
1                       Pool  0.04
2  Middle Eastern Restaurant  0.03
3             Hardware Store  0.03
4                Bridal Shop  0.03


----Morningside Heights----
                       venue  freq
0                 Food Truck  0.18
1     College Residence Hall  0.07
2  College Academic Building  0.06
3             Student Center  0.05
4                Coffee Shop  0.05


----Morris Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                             Grocery Store  0.06
2                         Convenience Store  0.04
3                        Salon / Barbershop  0.04
4                             Deli / Bodega  0.04


----Morris Park----
                                      venue  freq
0                           Doctor's Office  0.14
1  Residential Building (Apartment / Condo)  0.05
2                          Dentist's Office  0.04
3                                Nail Salon  0.04
4                               Pizza Place  0.02


----Morrisania----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.06
1                                    Church  0.06
2                               High School  0.06
3                        Chinese Restaurant  0.05
4                             Deli / Bodega  0.05


----Mott Haven----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.19
1                        Salon / Barbershop  0.06
2                        Chinese Restaurant  0.05
3                             Grocery Store  0.05
4                                    Church  0.04


----Mount Eden----
                                      venue  freq
0                           Automotive Shop  0.13
1  Residential Building (Apartment / Condo)  0.07
2                        Spanish Restaurant  0.05
3                               Pizza Place  0.05
4                           Doctor's Office  0.03


----Mount Hope----
                                      venue  freq
0                        Salon / Barbershop  0.15
1  Residential Building (Apartment / Condo)  0.08
2                                    Church  0.06
3                           Automotive Shop  0.05
4                             Deli / Bodega  0.04


----Murray Hill, Manhattan----
                                      venue  freq
0                           Doctor's Office  0.15
1  Residential Building (Apartment / Condo)  0.12
2                          Dentist's Office  0.09
3                                       Spa  0.03
4                               Event Space  0.03


----Murray Hill, Queens----
                venue  freq
0   Korean Restaurant  0.32
1              Bakery  0.04
2     Doctor's Office  0.04
3     Laundry Service  0.03
4  Salon / Barbershop  0.03


----Neponsit----
      venue  freq
0     Beach  0.22
1    School  0.05
2      Park  0.03
3  Boutique  0.03
4    Garden  0.02


----New Brighton----
             venue  freq
0    Deli / Bodega  0.14
1           Church  0.08
2             Park  0.07
3       Playground  0.05
4  Laundry Service  0.04


----New Dorp----
                venue  freq
0  Salon / Barbershop  0.09
1  Italian Restaurant  0.05
2  Mexican Restaurant  0.05
3           Pet Store  0.04
4              Bakery  0.04


----New Dorp Beach----
                   venue  freq
0     Italian Restaurant  0.04
1          Deli / Bodega  0.04
2  General Entertainment  0.04
3     Salon / Barbershop  0.04
4         Scenic Lookout  0.04


----New Lots----
                venue  freq
0              Church  0.09
1  Salon / Barbershop  0.08
2       Deli / Bodega  0.05
3  Chinese Restaurant  0.04
4     Laundry Service  0.04


----New Springville----
                venue  freq
0     Doctor's Office  0.11
1       Deli / Bodega  0.04
2  Salon / Barbershop  0.04
3          Bagel Shop  0.04
4   Mobile Phone Shop  0.04


----Noho----
                                      venue  freq
0                                       Bar  0.10
1  Residential Building (Apartment / Condo)  0.08
2                             Deli / Bodega  0.04
3                        Salon / Barbershop  0.04
4                              Cocktail Bar  0.04


----North Corona----
                       venue  freq
0              Deli / Bodega  0.07
1         Salon / Barbershop  0.05
2            Laundry Service  0.04
3  Latin American Restaurant  0.04
4         Mexican Restaurant  0.04


----North Riverdale----
                venue  freq
0   Mobile Phone Shop  0.05
1  Salon / Barbershop  0.05
2         Pizza Place  0.04
3                Bank  0.04
4                 Gym  0.04


----North Side----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                                       Bar  0.06
2                                 Nightclub  0.03
3                            Clothing Store  0.03
4                                  Wine Bar  0.03


----Norwood----
                                      venue  freq
0                           Doctor's Office  0.15
1                                      Park  0.07
2  Residential Building (Apartment / Condo)  0.06
3                             Deli / Bodega  0.06
4                            Medical Center  0.04


----Oakland Gardens----
                venue  freq
0   Korean Restaurant  0.08
1  Chinese Restaurant  0.06
2    Dentist's Office  0.05
3     Laundry Service  0.03
4    Sushi Restaurant  0.03


----Oakwood----
              venue  freq
0   Doctor's Office  0.24
1  Dentist's Office  0.10
2            Church  0.07
3    Medical Center  0.06
4   Other Nightlife  0.03


----Ocean Hill----
                                      venue  freq
0                             Deli / Bodega  0.11
1  Residential Building (Apartment / Condo)  0.09
2                        Salon / Barbershop  0.07
3                                    Church  0.05
4                             Metro Station  0.04


----Ocean Parkway----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                           Doctor's Office  0.08
2                           Coworking Space  0.04
3                          Dentist's Office  0.04
4                                 Synagogue  0.04


----Old Town----
                venue  freq
0      Medical Center  0.06
1                Bank  0.05
2  Italian Restaurant  0.05
3              Bakery  0.05
4      Cosmetics Shop  0.05


----Olinville----
                                      venue  freq
0                        Salon / Barbershop  0.13
1                             Deli / Bodega  0.06
2                      Caribbean Restaurant  0.06
3  Residential Building (Apartment / Condo)  0.05
4                                      Food  0.05


----Ozone Park----
           venue  freq
0  Deli / Bodega  0.09
1    Pizza Place  0.06
2       Pharmacy  0.05
3   Liquor Store  0.05
4     Nail Salon  0.04


----Paerdegat Basin----
                  venue  freq
0       Doctor's Office  0.09
1    Salon / Barbershop  0.06
2       Harbor / Marina  0.05
3  Caribbean Restaurant  0.04
4              Cemetery  0.04


----Park Hill----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                           Doctor's Office  0.09
2                               Event Space  0.03
3                       Housing Development  0.03
4                        Salon / Barbershop  0.03


----Park Slope----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                           Laundry Service  0.04
2                             Deli / Bodega  0.04
3                                Nail Salon  0.04
4                          Toy / Game Store  0.04


----Parkchester----
                                      venue  freq
0                        Salon / Barbershop  0.09
1                           Laundry Service  0.07
2  Residential Building (Apartment / Condo)  0.07
3                         Indian Restaurant  0.05
4                         Convenience Store  0.05


----Pelham Bay----
                                      venue  freq
0                            Medical Center  0.06
1                        Salon / Barbershop  0.06
2                        Chinese Restaurant  0.05
3                         Convenience Store  0.05
4  Residential Building (Apartment / Condo)  0.05


----Pelham Gardens----
                  venue  freq
0       Doctor's Office  0.20
1  Other Great Outdoors  0.04
2              Pharmacy  0.04
3            Playground  0.04
4           Pizza Place  0.04


----Pelham Parkway----
                                      venue  freq
0                           Doctor's Office  0.10
1                             Deli / Bodega  0.06
2                          Dentist's Office  0.06
3  Residential Building (Apartment / Condo)  0.06
4                                     Diner  0.04


----Pleasant Plains----
                venue  freq
0  Salon / Barbershop  0.12
1         Pizza Place  0.08
2              Bakery  0.04
3        Dessert Shop  0.02
4              Bridge  0.02


----Pomonok----
                                      venue  freq
0                           Doctor's Office  0.10
1  Residential Building (Apartment / Condo)  0.09
2                                Playground  0.06
3                          Dentist's Office  0.04
4                        Salon / Barbershop  0.04


----Port Ivory----
                                      venue  freq
0                             Boat or Ferry  0.07
1                           Automotive Shop  0.05
2                                Playground  0.04
3                                      Park  0.04
4  Residential Building (Apartment / Condo)  0.03


----Port Morris----
                                      venue  freq
0                                   Factory  0.10
1  Residential Building (Apartment / Condo)  0.07
2                       Government Building  0.04
3                             Design Studio  0.03
4                          Storage Facility  0.03


----Port Richmond----
                venue  freq
0     Automotive Shop  0.12
1       Deli / Bodega  0.09
2         Pizza Place  0.06
3  Mexican Restaurant  0.05
4     Laundry Service  0.05


----Prince's Bay----
                venue  freq
0  Salon / Barbershop  0.07
1     Doctor's Office  0.06
2              Church  0.06
3    Dentist's Office  0.04
4                Bank  0.04


----Prospect Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.13
1                        Mexican Restaurant  0.05
2                             Deli / Bodega  0.05
3                           Thai Restaurant  0.04
4                        Salon / Barbershop  0.04


----Prospect Lefferts Gardens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                        Salon / Barbershop  0.09
2                           Doctor's Office  0.06
3                             Deli / Bodega  0.06
4                                    School  0.05


----Prospect Park South----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.25
1                             Deli / Bodega  0.07
2                                    Church  0.04
3                        Salon / Barbershop  0.04
4                        Chinese Restaurant  0.03


----Queens Village----
                        venue  freq
0  Financial or Legal Service  0.06
1                        Food  0.06
2        Caribbean Restaurant  0.05
3                      Church  0.04
4                  Nail Salon  0.04


----Queensboro Hill----
                venue  freq
0  Chinese Restaurant  0.10
1     Doctor's Office  0.07
2    Asian Restaurant  0.06
3            Hospital  0.05
4      Medical Center  0.05


----Queensbridge----
                venue  freq
0               Hotel  0.08
1       Deli / Bodega  0.07
2  Miscellaneous Shop  0.07
3    Storage Facility  0.04
4       Metro Station  0.03


----Randall Manor----
                                      venue  freq
0                           Doctor's Office  0.10
1                               High School  0.09
2  Residential Building (Apartment / Condo)  0.08
3                                      Park  0.04
4                         College Classroom  0.04


----Ravenswood----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.14
1                           Laundry Service  0.08
2                                  Pharmacy  0.04
3                           Doctor's Office  0.03
4                             Grocery Store  0.03


----Red Hook----
                    venue  freq
0             Art Gallery  0.10
1  Furniture / Home Store  0.05
2               Bike Shop  0.03
3               Wine Shop  0.03
4                     Bar  0.03


----Rego Park----
                                      venue  freq
0                           Doctor's Office  0.15
1  Residential Building (Apartment / Condo)  0.13
2                            Medical Center  0.04
3                          Dentist's Office  0.04
4              General College & University  0.02


----Remsen Village----
                  venue  freq
0    Salon / Barbershop  0.12
1                Church  0.07
2       Automotive Shop  0.05
3  Caribbean Restaurant  0.05
4       Laundry Service  0.03


----Richmond Hill----
               venue  freq
0        Pizza Place  0.06
1  Convenience Store  0.05
2             Bakery  0.05
3         Nail Salon  0.04
4    Doctor's Office  0.04


----Richmond Town----
                venue  freq
0    Dentist's Office  0.07
1  Italian Restaurant  0.04
2              School  0.04
3       Grocery Store  0.04
4  Miscellaneous Shop  0.04


----Richmond Valley----
                  venue  freq
0    Salon / Barbershop  0.05
1                Bakery  0.04
2  Fast Food Restaurant  0.04
3     Convenience Store  0.03
4            Nail Salon  0.03


----Ridgewood----
                                      venue  freq
0                             Deli / Bodega  0.07
1                            Hardware Store  0.05
2  Residential Building (Apartment / Condo)  0.04
3                        Salon / Barbershop  0.04
4                            Cosmetics Shop  0.04


----Riverdale----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.24
1                                 Synagogue  0.09
2                           Doctor's Office  0.06
3                                      Park  0.05
4                                Playground  0.05


----Rochdale----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.14
1                           Doctor's Office  0.07
2                                Nail Salon  0.06
3                           Laundry Service  0.05
4                                      Park  0.04


----Rockaway Beach----
                                      venue  freq
0                             Deli / Bodega  0.08
1                                     Beach  0.08
2  Residential Building (Apartment / Condo)  0.08
3                               Pizza Place  0.03
4                        Seafood Restaurant  0.03


----Rockaway Park----
             venue  freq
0            Beach  0.12
1  Doctor's Office  0.08
2       Eye Doctor  0.08
3        Synagogue  0.04
4            Track  0.04


----Roosevelt Island----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                                    Church  0.08
2                           Laundry Service  0.05
3                                      Taxi  0.05
4                               Art Gallery  0.04


----Rosebank----
                   venue  freq
0            Pizza Place  0.06
1     Italian Restaurant  0.04
2     Mexican Restaurant  0.04
3         Ice Cream Shop  0.04
4  General Entertainment  0.04


----Rosedale----
                  venue  freq
0    Salon / Barbershop  0.07
1  Caribbean Restaurant  0.06
2           Gas Station  0.04
3        Cosmetics Shop  0.04
4       Laundry Service  0.03


----Rossville----
                   venue  freq
0  General Entertainment  0.06
1            Pizza Place  0.05
2     Athletics & Sports  0.04
3                    Bar  0.04
4         Medical Center  0.04


----Roxbury----
                venue  freq
0               Beach  0.10
1                 Bar  0.05
2      Hardware Store  0.03
3      Baseball Field  0.03
4  Seafood Restaurant  0.03


----Rugby----
                  venue  freq
0  Caribbean Restaurant  0.09
1    Salon / Barbershop  0.08
2       Laundry Service  0.06
3    Chinese Restaurant  0.06
4                  Food  0.05


----Sandy Ground----
                   venue  freq
0  General Entertainment  0.06
1      Elementary School  0.04
2     Athletics & Sports  0.04
3   Other Great Outdoors  0.04
4       Dentist's Office  0.03


----Schuylerville----
                         venue  freq
0              Doctor's Office  0.19
1           Salon / Barbershop  0.08
2                Deli / Bodega  0.07
3  Professional & Other Places  0.05
4                     Pharmacy  0.03


----Sea Gate----
                                      venue  freq
0                                     Beach  0.10
1                       Housing Development  0.06
2  Residential Building (Apartment / Condo)  0.04
3                               Yoga Studio  0.03
4                              Optical Shop  0.03


----Sheepshead Bay----
                                      venue  freq
0                           Harbor / Marina  0.10
1  Residential Building (Apartment / Condo)  0.06
2                             Boat or Ferry  0.05
3                      Other Great Outdoors  0.04
4                                      Park  0.04


----Shore Acres----
                venue  freq
0       Deli / Bodega  0.08
1  Italian Restaurant  0.05
2  Salon / Barbershop  0.05
3  Miscellaneous Shop  0.04
4    Dentist's Office  0.03


----Silver Lake----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                           College Library  0.07
2              General College & University  0.05
3                                  Cemetery  0.04
4           College Administrative Building  0.04


----Soho----
            venue  freq
0        Boutique  0.11
1  Clothing Store  0.11
2   Jewelry Store  0.06
3   Women's Store  0.06
4     Event Space  0.05


----Somerville----
             venue  freq
0  Automotive Shop  0.06
1  Harbor / Marina  0.04
2   Sandwich Place  0.04
3             Farm  0.03
4   Farmers Market  0.03


----Soundview----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                       Housing Development  0.06
2                           Laundry Service  0.05
3                               Pizza Place  0.04
4                             Grocery Store  0.04


----South Beach----
              venue  freq
0          Hospital  0.13
1    Medical Center  0.10
2   Doctor's Office  0.09
3             Beach  0.05
4  Dentist's Office  0.03


----South Jamaica----
                venue  freq
0     Automotive Shop  0.13
1              Church  0.12
2  Salon / Barbershop  0.05
3     Laundry Service  0.04
4         Pizza Place  0.04


----South Ozone Park----
                 venue  freq
0          Gas Station  0.09
1  Government Building  0.08
2        Deli / Bodega  0.05
3                  Bar  0.04
4                 Park  0.04


----South Side----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.13
1                        Salon / Barbershop  0.08
2                         Indian Restaurant  0.04
3                                  Tea Room  0.03
4                             Deli / Bodega  0.03


----Springfield Gardens----
                venue  freq
0              Church  0.09
1         Gas Station  0.08
2     Automotive Shop  0.05
3  Chinese Restaurant  0.05
4       Deli / Bodega  0.05


----Spuyten Duyvil----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.18
1                           Doctor's Office  0.10
2                            Medical Center  0.06
3                        Salon / Barbershop  0.04
4                          Dentist's Office  0.04


----St. Albans----
                  venue  freq
0    Salon / Barbershop  0.10
1  Caribbean Restaurant  0.07
2         Deli / Bodega  0.07
3       Laundry Service  0.06
4                Church  0.05


----St. George----
                                      venue  freq
0                                Courthouse  0.07
1                             Deli / Bodega  0.07
2                       Government Building  0.05
3                        Chinese Restaurant  0.04
4  Residential Building (Apartment / Condo)  0.04


----Stapleton----
                venue  freq
0                Food  0.08
1  Salon / Barbershop  0.08
2         Pizza Place  0.07
3              Church  0.07
4       Deli / Bodega  0.05


----Starrett City----
                                      venue  freq
0                           Doctor's Office  0.10
1                           Laundry Service  0.07
2  Residential Building (Apartment / Condo)  0.06
3                                   Parking  0.06
4                                  Pharmacy  0.04


----Steinway----
                  venue  freq
0       Automotive Shop  0.06
1         Deli / Bodega  0.05
2           Pizza Place  0.05
3  Gym / Fitness Center  0.05
4   Rental Car Location  0.04


----Stuyvesant Town----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.42
1                                Playground  0.13
2                                      Park  0.06
3                           Coworking Space  0.04
4                              Tech Startup  0.04


----Sunnyside Gardens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                           Laundry Service  0.07
2                                       Spa  0.05
3                             Grocery Store  0.05
4                                Nail Salon  0.05


----Sunnyside, Queens----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.10
1                             Deli / Bodega  0.07
2                               Pizza Place  0.07
3                           Laundry Service  0.06
4                        Salon / Barbershop  0.05


----Sunnyside, Staten Island----
                    venue  freq
0         Doctor's Office  0.10
1                 Theater  0.08
2  College Residence Hall  0.07
3         College Library  0.04
4            Dance Studio  0.04


----Sunset Park----
                venue  freq
0  Salon / Barbershop  0.06
1         Pizza Place  0.06
2        Optical Shop  0.05
3  Mexican Restaurant  0.04
4       Women's Store  0.04


----Sutton Place----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.09
1                                   Parking  0.05
2                      Gym / Fitness Center  0.04
3                                      Taxi  0.04
4                               Yoga Studio  0.02


----Throgs Neck----
                                      venue  freq
0                      Other Great Outdoors  0.09
1                        Chinese Restaurant  0.05
2                        Italian Restaurant  0.05
3                             Deli / Bodega  0.04
4  Residential Building (Apartment / Condo)  0.04


----Todt Hill----
                         venue  freq
0              Doctor's Office  0.15
1  Professional & Other Places  0.04
2           Salon / Barbershop  0.03
3                   Nail Salon  0.03
4             Sushi Restaurant  0.03


----Tompkinsville----
                  venue  freq
0    Salon / Barbershop  0.10
1    Mexican Restaurant  0.08
2                Church  0.05
3  Caribbean Restaurant  0.05
4           Pizza Place  0.05


----Tottenville----
                venue  freq
0  Italian Restaurant  0.08
1              School  0.06
2              Temple  0.05
3       Deli / Bodega  0.03
4               Beach  0.03


----Travis----
                venue  freq
0                Park  0.05
1               Hotel  0.05
2     Automotive Shop  0.05
3  Italian Restaurant  0.04
4         Pizza Place  0.04


----Tribeca----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.07
1                                      Café  0.04
2                                Food Truck  0.04
3                     General Entertainment  0.04
4                       American Restaurant  0.04


----Tudor City----
                                      venue  freq
0                           Doctor's Office  0.17
1  Residential Building (Apartment / Condo)  0.15
2                            Medical Center  0.06
3                                       Gym  0.05
4                           Laundry Service  0.04


----Turtle Bay----
                                      venue  freq
0                       Embassy / Consulate  0.13
1                       Government Building  0.13
2  Residential Building (Apartment / Condo)  0.12
3                                Non-Profit  0.03
4                                    Tunnel  0.03


----Unionport----
                venue  freq
0  Salon / Barbershop  0.12
1     Laundry Service  0.07
2       Deli / Bodega  0.06
3     Other Nightlife  0.03
4              Church  0.03


----University Heights----
                       venue  freq
0  College Academic Building  0.08
1              Deli / Bodega  0.07
2         Salon / Barbershop  0.05
3                        Bar  0.03
4                Supermarket  0.03


----Upper East Side----
                                      venue  freq
0                           Doctor's Office  0.31
1                               Art Gallery  0.10
2  Residential Building (Apartment / Condo)  0.10
3                          Dentist's Office  0.06
4                            Medical Center  0.06


----Upper West Side----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                                Shoe Store  0.04
2                        Salon / Barbershop  0.04
3                           Laundry Service  0.04
4                                Nail Salon  0.04


----Utopia----
               venue  freq
0    Automotive Shop  0.07
1      Deli / Bodega  0.06
2    Laundry Service  0.04
3         Playground  0.04
4  Elementary School  0.04


----Van Nest----
                venue  freq
0       Deli / Bodega  0.07
1  Salon / Barbershop  0.05
2          Nail Salon  0.05
3     Laundry Service  0.05
4         Pizza Place  0.04


----Vinegar Hill----
                                      venue  freq
0                              Tech Startup  0.11
1                               Art Gallery  0.07
2  Residential Building (Apartment / Condo)  0.05
3                               Event Space  0.04
4                     General Entertainment  0.04


----Wakefield----
                venue  freq
0  Salon / Barbershop  0.07
1     Laundry Service  0.06
2                Food  0.03
3     Doctor's Office  0.03
4              Church  0.03


----Washington Heights----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.17
1                           Doctor's Office  0.10
2                        Salon / Barbershop  0.05
3                             Metro Station  0.05
4                                   Daycare  0.05


----Weeksville----
                                      venue  freq
0                           Automotive Shop  0.06
1                      Caribbean Restaurant  0.06
2                        Salon / Barbershop  0.06
3                        Chinese Restaurant  0.04
4  Residential Building (Apartment / Condo)  0.04


----West Brighton----
                venue  freq
0     Doctor's Office  0.06
1                Bank  0.05
2           Gift Shop  0.03
3          Bagel Shop  0.03
4  Salon / Barbershop  0.03


----West Farms----
                                      venue  freq
0                           Automotive Shop  0.06
1                           Doctor's Office  0.04
2                                    School  0.04
3  Residential Building (Apartment / Condo)  0.04
4                                Donut Shop  0.03


----West Village----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.11
1                              Cocktail Bar  0.06
2                        Salon / Barbershop  0.04
3                           Laundry Service  0.04
4                              Antique Shop  0.03


----Westchester Square----
                  venue  freq
0  Fast Food Restaurant  0.03
1       Automotive Shop  0.03
2            Nail Salon  0.03
3        Cosmetics Shop  0.03
4     Convenience Store  0.03


----Westerleigh----
                        venue  freq
0             Doctor's Office  0.06
1          Salon / Barbershop  0.04
2            Sushi Restaurant  0.03
3                        Bank  0.03
4  Financial or Legal Service  0.03


----Whitestone----
                venue  freq
0       Deli / Bodega  0.10
1  Italian Restaurant  0.06
2  Salon / Barbershop  0.04
3                 Gym  0.04
4   Convenience Store  0.03


----Williamsbridge----
                  venue  freq
0                Church  0.09
1    Salon / Barbershop  0.08
2  Caribbean Restaurant  0.06
3                School  0.04
4                   Spa  0.03


----Williamsburg----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.08
1                               Pizza Place  0.06
2                        Salon / Barbershop  0.05
3                        Chinese Restaurant  0.04
4                                      Park  0.04


----Willowbrook----
             venue  freq
0        Synagogue  0.07
1    Deli / Bodega  0.06
2           Church  0.06
3  Laundry Service  0.04
4     Dance Studio  0.04


----Windsor Terrace----
             venue  freq
0    Middle School  0.04
1           Bridge  0.04
2    Deli / Bodega  0.04
3   Hardware Store  0.04
4  Thai Restaurant  0.04


----Wingate----
                venue  freq
0  Salon / Barbershop  0.07
1              School  0.05
2                Food  0.04
3       Deli / Bodega  0.04
4         Event Space  0.04


----Woodhaven----
                venue  freq
0       Deli / Bodega  0.11
1  Salon / Barbershop  0.09
2     Laundry Service  0.06
3  Miscellaneous Shop  0.05
4        Liquor Store  0.04


----Woodlawn----
                venue  freq
0                 Bar  0.11
1  Salon / Barbershop  0.06
2       Deli / Bodega  0.06
3         Pizza Place  0.04
4              Church  0.04


----Woodrow----
               venue  freq
0               Pool  0.05
1             School  0.04
2      Grocery Store  0.04
3  Fish & Chips Shop  0.02
4          Gift Shop  0.02


----Woodside----
                venue  freq
0  Salon / Barbershop  0.07
1                 Bar  0.07
2  Mexican Restaurant  0.05
3            Platform  0.04
4     Thai Restaurant  0.04


----Yorkville----
                                      venue  freq
0  Residential Building (Apartment / Condo)  0.25
1                           Laundry Service  0.06
2                                       Spa  0.05
3                                       Gym  0.03
4                        Salon / Barbershop  0.03


The most common categories for each neighborhood

First, let's write a function to sort the venues in descending order.

In [27]:
def return_most_common_venues(row, num_top_cat):
    row_categories = row.iloc[1:]
    row_categories_sorted = row_categories.sort_values(ascending=False)
    
    return row_categories_sorted.index.values[0:num_top_cat]
In [28]:
num_top_cat = 10

indicators  = ['st', 'nd', 'rd']

# create columns according to number of top venues
columns = ['Neighborhood']
for ind in np.arange(num_top_cat):
    try:
        columns.append('{}{} Most Common Category'.format(ind+1, indicators[ind]))
    except:
        columns.append('{}th Most Common Category'.format(ind+1))

# create a new dataframe
nyc_neighborhoods_categories_sorted = pd.DataFrame(columns=columns)
nyc_neighborhoods_categories_sorted['Neighborhood'] = nyc_grouped['Neighborhood']

for ind in np.arange(nyc_grouped.shape[0]):
    nyc_neighborhoods_categories_sorted.iloc[ind, 1:] = return_most_common_venues(
        nyc_grouped.iloc[ind, :], num_top_cat)

nyc_neighborhoods_categories_sorted.head()
Out[28]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
0 Allerton Salon / Barbershop Laundry Service Food Pharmacy Pizza Place Gas Station Car Wash Non-Profit Funeral Home Automotive Shop
1 Annadale Salon / Barbershop Pizza Place American Restaurant Nail Salon Tattoo Parlor Bar Bagel Shop Bakery Pet Store Doctor's Office
2 Arden Heights Professional & Other Places Church Dentist's Office Doctor's Office Food Bridge Other Great Outdoors Moving Target Bar Italian Restaurant
3 Arlington Church Hardware Store Residential Building (Apartment / Condo) Salon / Barbershop Automotive Shop Professional & Other Places Playground Deli / Bodega American Restaurant Laundry Service
4 Arrochar Deli / Bodega Pizza Place Food Truck Liquor Store Dance Studio Restaurant Salon / Barbershop Dry Cleaner Laundry Service Beach

1.3 Clustering

Now we apply K-means clustering on the dataframe stored in nyc_grouped variable which includes the relative frequency of each venue-category for each neighborhood.

In [29]:
# set number of clusters
kclusters = 5

nyc_grouped_clustering = nyc_grouped.drop('Neighborhood', 1)

# run k-means clustering
kmeans = KMeans(n_clusters=kclusters, random_state=0).fit(nyc_grouped_clustering)

# check cluster labels generated for each row in the dataframe
kmeans.labels_[0:10] 
Out[29]:
array([3, 1, 1, 1, 1, 1, 0, 1, 1, 1], dtype=int32)
In [30]:
# add clustering labels
nyc_neighborhoods_categories_sorted.insert(0, 'Cluster Labels', kmeans.labels_)

nyc_merged = nyc_neighborhoods.rename(columns={'Neighborhood': 'Neighborhood'}).copy()
nyc_merged = nyc_merged[~nyc_merged['Neighborhood'].isin(nyc_excluded_neighborhoods)]

# merge toronto_grouped with toronto_data to add latitude/longitude for each neighborhood
nyc_merged = nyc_merged.join(nyc_neighborhoods_categories_sorted.set_index('Neighborhood'), on='Neighborhood')

nyc_merged.head() # check the last columns!
Out[30]:
Borough Neighborhood Latitude Longitude Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
0 Bronx Wakefield 40.894705 -73.847201 3 Salon / Barbershop Laundry Service Coworking Space Church Doctor's Office Gas Station Food Residential Building (Apartment / Condo) Convenience Store Professional & Other Places
1 Bronx Co-op City 40.874294 -73.829939 4 Residential Building (Apartment / Condo) School Other Great Outdoors Church Pharmacy Financial or Legal Service Liquor Store High School Laundry Service Parking
2 Bronx Eastchester 40.887556 -73.827806 1 Automotive Shop Caribbean Restaurant Deli / Bodega Gas Station Factory Metro Station Hardware Store Fast Food Restaurant Church Bridge
3 Bronx Fieldston 40.895437 -73.905643 1 Synagogue Residential Building (Apartment / Condo) College Administrative Building College Residence Hall College Academic Building College Quad High School Historic Site College Classroom Park
4 Bronx Riverdale 40.890834 -73.912585 0 Residential Building (Apartment / Condo) Synagogue Doctor's Office Park Playground Athletics & Sports Beach Bar Gym / Fitness Center Dog Run Pool
In [31]:
nyc_merged['Cluster Labels']
Out[31]:
0      3
1      4
2      1
3      1
4      0
5      1
6      3
7      3
8      2
9      3
10     1
11     2
12     1
13     0
14     3
15     4
16     1
17     3
18     1
19     4
20     4
21     0
22     4
23     1
24     1
25     4
26     4
27     1
28     1
29     1
30     4
31     1
32     3
33     2
34     3
35     0
36     1
37     1
38     2
39     1
40     1
41     3
42     2
43     4
44     3
45     4
46     4
47     1
48     1
49     1
50     1
51     1
52     1
53     2
54     0
55     4
56     3
57     1
58     1
59     4
60     4
61     4
62     4
63     1
64     2
65     4
66     4
67     1
68     1
69     4
70     4
71     3
72     3
73     2
74     3
75     3
76     1
77     1
78     4
79     1
80     1
81     2
82     1
83     1
84     4
85     1
86     1
87     3
88     4
89     4
90     3
91     1
92     4
93     0
94     2
95     4
96     4
97     4
98     4
99     2
100    1
101    0
102    3
103    4
104    4
105    4
106    4
107    2
108    0
109    4
110    4
111    4
112    1
113    1
114    1
115    2
116    1
117    4
118    4
119    0
120    4
121    1
122    1
123    4
124    3
125    1
126    2
127    4
128    1
129    0
130    3
131    0
132    4
133    1
134    3
135    2
136    4
137    1
138    1
139    4
140    4
141    3
142    1
143    1
144    2
145    2
146    3
147    1
148    1
149    1
150    1
151    1
152    1
153    1
154    1
155    1
156    1
157    1
158    4
159    0
160    1
161    1
162    1
163    3
164    3
165    3
166    0
167    1
168    3
169    3
170    3
171    1
172    1
173    1
174    1
175    0
176    1
177    1
178    4
179    1
180    1
181    1
182    2
183    1
184    1
185    1
186    4
187    2
188    3
189    0
190    1
191    1
192    1
193    1
194    3
195    3
196    0
197    1
198    3
199    3
200    1
201    1
202    4
203    2
204    2
205    1
206    1
207    1
208    2
209    2
210    1
211    1
212    2
213    3
214    1
215    1
216    1
217    1
218    3
219    4
220    2
221    0
222    3
223    3
224    4
225    1
226    1
227    1
228    1
229    1
230    1
231    2
232    1
233    1
234    1
235    1
236    1
237    3
238    1
239    1
240    1
241    1
242    2
243    2
244    1
245    2
246    2
247    4
248    4
249    1
250    1
251    1
252    3
253    1
254    2
255    2
256    2
257    1
258    3
259    3
260    3
261    1
262    1
263    3
264    1
265    2
266    1
267    3
268    4
269    1
270    3
271    4
272    1
273    4
274    2
275    0
276    1
277    4
278    1
279    1
280    1
281    3
282    1
283    1
284    1
285    1
286    1
287    2
288    1
289    3
290    1
291    1
292    1
293    1
294    1
295    3
296    2
297    4
298    3
299    4
300    3
301    1
302    4
303    1
304    1
305    4
Name: Cluster Labels, dtype: int32

Creating a map that shows the neighborhoods and their clusters

We will create a map that shows a marker for each neighborhood; the color of the marker represents the cluster of the neighborhood.

In [32]:
# create map
map_clusters = folium.Map(location  = [latitude, longitude], 
                          zoom_start= 10,
                          min_zoom  = 9, 
                          max_zoom  = 11)

# # set color scheme for the clusters
# colors = {
#     nyc_borough_list[0]:'red',
#     nyc_borough_list[1]:'blue',
#     nyc_borough_list[2]:'yellow',
#     nyc_borough_list[3]:'green',
#     nyc_borough_list[4]:'orange'}

# add markers to the map
for lat, lon, poi, cluster in zip(nyc_merged['Latitude'], nyc_merged['Longitude'], 
                                  nyc_merged['Neighborhood'], nyc_merged['Cluster Labels']):
    label = folium.Popup(str(poi) + ' Cluster ' + str(cluster), parse_html=True)
    folium.CircleMarker(
        [lat, lon],
        radius=3,
        weight=1,
        popup =label,
        color ='black',
        fill  =True,
        fill_color=colors[nyc_borough_list[cluster]],
        fill_opacity=0.8).add_to(map_clusters)
       
map_clusters
Out[32]:
Make this Notebook Trusted to load map: File -> Trust Notebook

Examining clusters

Let's see the neighborhoods in each of the five clusters:

In [33]:
nyc_merged.loc[nyc_merged['Cluster Labels'] == 0, 
               nyc_merged.columns[[1] + list(range(5, nyc_merged.shape[1]))]]
Out[33]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
4 Riverdale Residential Building (Apartment / Condo) Synagogue Doctor's Office Park Playground Athletics & Sports Beach Bar Gym / Fitness Center Dog Run Pool
13 Bedford Park Residential Building (Apartment / Condo) Deli / Bodega Church Salon / Barbershop Doctor's Office School Laundry Service Fruit & Vegetable Store Medical Center Park
21 Mott Haven Residential Building (Apartment / Condo) Salon / Barbershop Grocery Store Chinese Restaurant Church Elementary School Pharmacy Pizza Place Department Store Restaurant
35 Spuyten Duyvil Residential Building (Apartment / Condo) Doctor's Office Medical Center Salon / Barbershop Dentist's Office Park American Restaurant Spa Nursery School Deli / Bodega
54 Flatbush Residential Building (Apartment / Condo) Salon / Barbershop Cocktail Bar Deli / Bodega Doctor's Office Church Gym Mexican Restaurant Lounge Dentist's Office
93 Prospect Park South Residential Building (Apartment / Condo) Deli / Bodega Church Salon / Barbershop Chinese Restaurant Financial or Legal Service Caribbean Restaurant Non-Profit Garden School
101 Washington Heights Residential Building (Apartment / Condo) Doctor's Office Daycare Dentist's Office Salon / Barbershop Metro Station Bike Shop Intersection Flower Shop Massage Studio
108 Yorkville Residential Building (Apartment / Condo) Laundry Service Spa Flower Shop Pharmacy Salon / Barbershop Gym Pizza Place General Entertainment Taxi
119 Lower East Side Residential Building (Apartment / Condo) Housing Development Deli / Bodega Bike Rental / Bike Share Art Gallery Bridge Pizza Place Diner Church Gym
129 Astoria Residential Building (Apartment / Condo) Lounge Bakery Deli / Bodega Church Bar Laundry Service Latin American Restaurant Dentist's Office General Travel
131 Jackson Heights Residential Building (Apartment / Condo) Dentist's Office Doctor's Office Salon / Barbershop Latin American Restaurant School Parking Church Boutique Gym
159 Briarwood Residential Building (Apartment / Condo) Deli / Bodega Playground Dentist's Office Church Music Venue Intersection General Entertainment Miscellaneous Shop Doctor's Office
166 Rochdale Residential Building (Apartment / Condo) Doctor's Office Nail Salon Laundry Service Park Chinese Restaurant Market Pharmacy Dentist's Office Fast Food Restaurant
175 Bay Terrace, Queens Residential Building (Apartment / Condo) Doctor's Office Women's Store Pool Bank Dentist's Office Elementary School Playground Kids Store General Entertainment
189 Lefrak City Residential Building (Apartment / Condo) Deli / Bodega Laundry Service Salon / Barbershop Cultural Center Pizza Place Government Building Medical Center Convenience Store Housing Development
196 Forest Hills Gardens Residential Building (Apartment / Condo) Salon / Barbershop Park Garden Church Bakery Grocery Store Gym Laundry Service Restaurant
221 Ditmas Park Residential Building (Apartment / Condo) Deli / Bodega Salon / Barbershop Nail Salon Church Burger Joint Dentist's Office Chinese Restaurant Bar Health & Beauty Service
275 Stuyvesant Town Residential Building (Apartment / Condo) Playground Park Tech Startup Coworking Space Parking Financial or Legal Service Bike Rental / Bike Share Boat or Ferry Event Space
In [34]:
nyc_merged.loc[nyc_merged['Cluster Labels'] == 1, 
               nyc_merged.columns[[1] + list(range(5, nyc_merged.shape[1]))]]
Out[34]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
2 Eastchester Automotive Shop Caribbean Restaurant Deli / Bodega Gas Station Factory Metro Station Hardware Store Fast Food Restaurant Church Bridge
3 Fieldston Synagogue Residential Building (Apartment / Condo) College Administrative Building College Residence Hall College Academic Building College Quad High School Historic Site College Classroom Park
5 Kingsbridge Laundry Service Bank Salon / Barbershop Boutique Mattress Store Discount Store Bagel Shop Gym / Fitness Center College Bookstore Pet Store
10 Baychester Gas Station Chinese Restaurant Donut Shop Playground Gym / Fitness Center Automotive Shop Fast Food Restaurant Sandwich Place Residential Building (Apartment / Condo) Garden
12 City Island Harbor / Marina Miscellaneous Shop Antique Shop Residential Building (Apartment / Condo) Thrift / Vintage Store Beach Park Grocery Store Gas Station Pharmacy
16 Fordham Clothing Store Deli / Bodega Doctor's Office Women's Store Nail Salon Bank Shoe Store Bakery Non-Profit Government Building
18 West Farms Automotive Shop Residential Building (Apartment / Condo) School Doctor's Office Post Office Chinese Restaurant Sandwich Place Deli / Bodega Metro Station Donut Shop
23 Longwood Pizza Place Train Automotive Shop Mexican Restaurant Food Salon / Barbershop Grocery Store Church Gas Station Fast Food Restaurant
24 Hunts Point Automotive Shop Factory Food Pizza Place Mexican Restaurant School Spanish Restaurant Farmers Market General Entertainment Hardware Store
27 Clason Point Park Housing Development Lounge Salon / Barbershop Intersection Event Space Automotive Shop Pool American Restaurant Cosmetics Shop
28 Throgs Neck Other Great Outdoors Chinese Restaurant Italian Restaurant Deli / Bodega Pizza Place Residential Building (Apartment / Condo) General Entertainment Miscellaneous Shop Coffee Shop Japanese Restaurant
29 Country Club Coffee Shop Deli / Bodega Pizza Place Salon / Barbershop Nail Salon Gym / Fitness Center Chinese Restaurant Library Bar Playground
31 Westchester Square Convenience Store Salon / Barbershop Nail Salon Nightclub Automotive Shop Fast Food Restaurant Cosmetics Shop Pharmacy Event Space Optical Shop
36 North Riverdale Salon / Barbershop Mobile Phone Shop Gym Pizza Place Bank Residential Building (Apartment / Condo) American Restaurant Miscellaneous Shop Urgent Care Center Dentist's Office
37 Pelham Bay Salon / Barbershop Medical Center Chinese Restaurant Residential Building (Apartment / Condo) Convenience Store Bagel Shop Doctor's Office Italian Restaurant Deli / Bodega General Entertainment
39 Edgewater Park Deli / Bodega Italian Restaurant Automotive Shop Salon / Barbershop Chinese Restaurant Medical Center Pharmacy Fire Station Bar Donut Shop
40 Castle Hill School Residential Building (Apartment / Condo) Medical Center Financial or Legal Service Spanish Restaurant Food Emergency Room Pharmacy Church Other Great Outdoors
47 Bensonhurst Doctor's Office Nail Salon Italian Restaurant Salon / Barbershop Design Studio Park Gas Station Deli / Bodega Residential Building (Apartment / Condo) Pizza Place
48 Sunset Park Pizza Place Salon / Barbershop Optical Shop Miscellaneous Shop Shoe Store Department Store Mexican Restaurant Mobile Phone Shop Food Truck Women's Store
49 Greenpoint Deli / Bodega Doctor's Office Butcher Residential Building (Apartment / Condo) Pharmacy Medical Lab Pizza Place Dentist's Office Salon / Barbershop Bakery
50 Gravesend Automotive Shop Deli / Bodega Salon / Barbershop Spa Pharmacy Bakery Furniture / Home Store Pizza Place Martial Arts School Laundry Service
51 Brighton Beach Salon / Barbershop Gourmet Shop Restaurant Sushi Restaurant Pharmacy Health & Beauty Service Eastern European Restaurant Liquor Store Fruit & Vegetable Store Spa
52 Sheepshead Bay Harbor / Marina Residential Building (Apartment / Condo) Boat or Ferry Playground Other Great Outdoors Park Bagel Shop Turkish Restaurant Lake Fishing Spot
57 Kensington Grocery Store Bank Food Truck Doctor's Office Mexican Restaurant Deli / Bodega Laundry Service Restaurant Miscellaneous Shop Hardware Store
58 Windsor Terrace Doctor's Office School Hardware Store Grocery Store Deli / Bodega Bridge Scenic Lookout Middle School Thai Restaurant Medical Center
63 Bedford Stuyvesant Deli / Bodega School Laundry Service Salon / Barbershop Grocery Store Church Bike Rental / Bike Share Food Hardware Store Nail Salon
67 Red Hook Art Gallery Furniture / Home Store Bike Shop Bar Wine Shop Deli / Bodega Art Studio Garden Boutique Coffee Shop
68 Gowanus Art Gallery Design Studio Coworking Space General Entertainment Tech Startup Metro Station Food Truck Factory Hardware Store Parking
76 Mill Island Pool Harbor / Marina Salon / Barbershop Middle Eastern Restaurant Hardware Store Pizza Place Bridal Shop Convenience Store Moving Target Other Great Outdoors
77 Manhattan Beach Harbor / Marina Boat or Ferry Turkish Restaurant Dessert Shop Café Parking Fishing Spot Bagel Shop Sandwich Place Dog Run
79 Bath Beach Deli / Bodega Pizza Place Residential Building (Apartment / Condo) Salon / Barbershop Gas Station Doctor's Office Sushi Restaurant Restaurant Halal Restaurant Lounge
80 Borough Park Synagogue College Academic Building Bank Clothing Store Smoothie Shop Event Space Salon / Barbershop Lounge Gas Station School
82 Gerritsen Beach Bar Gas Station Housing Development Ice Cream Shop Boat or Ferry Bike Shop Professional & Other Places Liquor Store Church Hookah Bar
83 Marine Park Park Doctor's Office Nail Salon Laundry Service Deli / Bodega American Restaurant Gym / Fitness Center Salon / Barbershop Coffee Shop Miscellaneous Shop
85 Sea Gate Beach Housing Development Residential Building (Apartment / Condo) Yoga Studio Pharmacy Music Venue Non-Profit Optical Shop Event Space Paper / Office Supplies Store
86 Downtown Shoe Store Gym / Fitness Center Residential Building (Apartment / Condo) American Restaurant Coffee Shop Bar Italian Restaurant Burger Joint Dumpling Restaurant Clothing Store
91 Bergen Beach Doctor's Office Playground Dentist's Office Event Space Salon / Barbershop Medical Center Deli / Bodega Park Café Moving Target
100 Chinatown Chinese Restaurant Bakery Park Bridge Japanese Restaurant Asian Restaurant Fried Chicken Joint Miscellaneous Shop Noodle House Diner
112 Lincoln Square Theater High School Performing Arts Venue Concert Hall Opera House Residential Building (Apartment / Condo) Plaza Library Event Space Art Gallery
113 Clinton Theater Restaurant General Entertainment Laundry Service Concert Hall Cocktail Bar Gym / Fitness Center Deli / Bodega Bar Parking
114 Midtown General College & University Shoe Store College Administrative Building Dance Studio Mosque Tech Startup American Restaurant Bank Design Studio Tailor Shop
116 Chelsea, Manhattan High School Deli / Bodega Arts & Entertainment Food Truck Café Speakeasy Church Residential Building (Apartment / Condo) Recreation Center Pizza Place
121 Little Italy Italian Restaurant Salon / Barbershop Smoke Shop Gift Shop Gourmet Shop Miscellaneous Shop Pizza Place Other Nightlife Bakery Lounge
122 Soho Clothing Store Boutique Women's Store Jewelry Store Event Space Men's Store Furniture / Home Store Music Venue Accessories Store Gym
125 Morningside Heights Food Truck College Residence Hall College Academic Building Student Center Coffee Shop General College & University Residential Building (Apartment / Condo) College Quad College Classroom Ice Cream Shop
128 Financial District Historic Site Food Truck Bar Gym Movie Theater Gym / Fitness Center Food Court Financial or Legal Service Event Space Doctor's Office
133 Howard Beach Salon / Barbershop Italian Restaurant Pharmacy Sandwich Place Café Gym Gas Station Bagel Shop Bank Bridge
137 Richmond Hill Pizza Place Convenience Store Bakery Nail Salon Doctor's Office Salon / Barbershop Latin American Restaurant Residential Building (Apartment / Condo) Miscellaneous Shop Caribbean Restaurant
138 Flushing Bar Korean Restaurant Karaoke Bar Chinese Restaurant Hotel Residential Building (Apartment / Condo) Church Pool Hall Cosmetics Shop Malay Restaurant
142 Maspeth Pizza Place Nail Salon Grocery Store Dentist's Office Salon / Barbershop Bank Hardware Store Financial or Legal Service Deli / Bodega Doctor's Office
143 Ridgewood Deli / Bodega Hardware Store Italian Restaurant Cosmetics Shop Grocery Store Greek Restaurant Residential Building (Apartment / Condo) Salon / Barbershop Restaurant Thai Restaurant
147 Ozone Park Deli / Bodega Pizza Place Liquor Store Pharmacy Nail Salon Bakery Metro Station Furniture / Home Store Spanish Restaurant Tattoo Parlor
148 South Ozone Park Gas Station Government Building Deli / Bodega Park Bar Parking Taxi Moving Target Chinese Restaurant Gym / Fitness Center
149 College Point Automotive Shop Mexican Restaurant Bank Salon / Barbershop Doctor's Office Deli / Bodega Gas Station Laundry Service School Butcher
150 Whitestone Deli / Bodega Italian Restaurant Gym Salon / Barbershop Playground Convenience Store Laundry Service Residential Building (Apartment / Condo) Other Great Outdoors Bar
151 Bayside Greek Restaurant Salon / Barbershop Doctor's Office Spa Dentist's Office Café Pharmacy Optical Shop Indian Restaurant Funeral Home
152 Auburndale Automotive Shop Train Nail Salon Deli / Bodega Event Space Lawyer Athletics & Sports Laundry Service Residential Building (Apartment / Condo) School
153 Little Neck Chinese Restaurant Salon / Barbershop Laundry Service Food Korean Restaurant School Japanese Restaurant Cantonese Restaurant Veterinarian Deli / Bodega
154 Douglaston Salon / Barbershop Italian Restaurant Chinese Restaurant Church School Korean Restaurant Doctor's Office Pizza Place Laundry Service Dentist's Office
155 Glen Oaks Hospital Laundry Service Playground Bank Pharmacy Pizza Place Doctor's Office Residential Building (Apartment / Condo) Salon / Barbershop Bike Rental / Bike Share
156 Bellerose Dentist's Office Salon / Barbershop Automotive Shop Deli / Bodega Pizza Place Italian Restaurant Arts & Crafts Store Medical Center Hardware Store Health & Beauty Service
157 Kew Gardens Hills Doctor's Office Bank Dentist's Office School Convenience Store Candy Store Sushi Restaurant Restaurant Pharmacy Salon / Barbershop
160 Jamaica Center Salon / Barbershop Clothing Store Department Store Optical Shop Government Building Kids Store Caribbean Restaurant Mobile Phone Shop Grocery Store Men's Store
161 Oakland Gardens Korean Restaurant Chinese Restaurant Dentist's Office Sushi Restaurant Laundry Service Pharmacy Yoga Studio Salon / Barbershop Medical Center Gas Station
162 Queens Village Financial or Legal Service Food Caribbean Restaurant Church Bank Nail Salon Parking Latin American Restaurant Salon / Barbershop Deli / Bodega
167 Springfield Gardens Church Gas Station Chinese Restaurant Automotive Shop Deli / Bodega High School Donut Shop Pizza Place Fried Chicken Joint Park
171 Broad Channel Plane Harbor / Marina Park Deli / Bodega Church Fast Food Restaurant Other Great Outdoors Beach Bar Salon / Barbershop Sandwich Place
172 Breezy Point Beach Bar Surf Spot Other Great Outdoors Church Monument / Landmark Basketball Court Trail Gym Playground
173 Steinway Automotive Shop Pizza Place Gym / Fitness Center Deli / Bodega Rental Car Location Baseball Field Lounge Greek Restaurant Salon / Barbershop Laundry Service
174 Beechhurst Salon / Barbershop Bank Chinese Restaurant Doctor's Office Pizza Place Gym / Fitness Center Dentist's Office Pharmacy Optical Shop Shopping Mall
176 Edgemere Medical Center Residential Building (Apartment / Condo) Dog Run Beach Church Deli / Bodega Farm Metro Station Pizza Place Park
177 Arverne Surf Spot Bank Housing Development Beach Playground Deli / Bodega Sandwich Place Chinese Restaurant Farm Laundry Service
179 Neponsit Beach School Park Boutique Yoga Studio Bar Deli / Bodega Doctor's Office Spa Synagogue
180 Murray Hill, Queens Korean Restaurant Doctor's Office Bakery Laundry Service Salon / Barbershop Food Automotive Shop Gas Station Karaoke Bar Asian Restaurant
181 Floral Park Indian Restaurant Lounge Doctor's Office Salon / Barbershop Ice Cream Shop Dentist's Office Grocery Store Financial or Legal Service Pizza Place Gym
183 Jamaica Estates Church School Playground General College & University Beer Garden High School Speakeasy Spiritual Center Moving Target General Travel
184 Queensboro Hill Chinese Restaurant Doctor's Office Asian Restaurant Medical Center Hospital Bank Hospital Ward Car Wash Bakery Liquor Store
185 Hillcrest College Academic Building General College & University Salon / Barbershop University College Cafeteria Medical Center College Classroom Student Center College Basketball Court Doctor's Office
190 Belle Harbor Beach Boutique School Doctor's Office Salon / Barbershop Pub Garden Mobile Phone Shop Spa Bar
191 Rockaway Park Beach Doctor's Office Eye Doctor Bakery French Restaurant Track Physical Therapist Automotive Shop General Travel Park
192 Somerville Automotive Shop Harbor / Marina Sandwich Place Airport Gate Laundry Service Medical Center Board Shop Plane Farm Pizza Place
193 Brookville Doctor's Office Deli / Bodega Park Fast Food Restaurant Dentist's Office Clothing Store Warehouse Chinese Restaurant Pizza Place Residential Building (Apartment / Condo)
197 St. George Courthouse Deli / Bodega Government Building College Classroom Chinese Restaurant Residential Building (Apartment / Condo) College Gym Pizza Place Police Station Sandwich Place
200 Rosebank Pizza Place Ice Cream Shop Nail Salon Mexican Restaurant General Entertainment Italian Restaurant Mobile Phone Shop Pharmacy Laundromat Laundry Service
201 West Brighton Doctor's Office Bank Pizza Place Bagel Shop Salon / Barbershop Breakfast Spot Gift Shop Gas Station Diner Coffee Shop
205 Port Richmond Automotive Shop Deli / Bodega Pizza Place Laundry Service Mexican Restaurant Church Martial Arts School Breakfast Spot Doctor's Office Bar
206 Mariner's Harbor Automotive Shop Church Deli / Bodega School Miscellaneous Shop Medical Center Professional & Other Places Elementary School Italian Restaurant High School
207 Port Ivory Boat or Ferry Automotive Shop Playground Park Storage Facility Doctor's Office Government Building Laundry Service Professional & Other Places Event Space
210 Travis Hotel Automotive Shop Park Bar Italian Restaurant Pizza Place Other Great Outdoors Bowling Alley Spanish Restaurant Church
211 New Dorp Salon / Barbershop Mexican Restaurant Italian Restaurant Spa Bakery Pet Store Chiropractor Dentist's Office General Entertainment Event Space
214 Eltingville Salon / Barbershop Nail Salon Medical Center Automotive Shop Bagel Shop Pizza Place Italian Restaurant Butcher Gym Diner
215 Annadale Salon / Barbershop Pizza Place American Restaurant Nail Salon Tattoo Parlor Bar Bagel Shop Bakery Pet Store Doctor's Office
216 Woodrow Pool School Grocery Store Bar Cocktail Bar Pharmacy Salon / Barbershop Gift Shop Liquor Store Laundry Service
217 Tottenville Italian Restaurant School Temple Dog Run Church Beach Deli / Bodega Salon / Barbershop Bar Bank
225 Westerleigh Doctor's Office Salon / Barbershop Financial or Legal Service Bank Miscellaneous Shop Dive Bar Sushi Restaurant Nail Salon Liquor Store Mobile Phone Shop
226 Graniteville Dentist's Office Nail Salon Doctor's Office Elementary School General Travel Automotive Shop Residential Building (Apartment / Condo) Taxi Park Chiropractor
227 Arlington Church Hardware Store Residential Building (Apartment / Condo) Salon / Barbershop Automotive Shop Professional & Other Places Playground Deli / Bodega American Restaurant Laundry Service
228 Arrochar Deli / Bodega Pizza Place Food Truck Liquor Store Dance Studio Restaurant Salon / Barbershop Dry Cleaner Laundry Service Beach
229 Grasmere Doctor's Office Residential Building (Apartment / Condo) Dentist's Office Dance Studio Chinese Restaurant Bagel Shop Church Grocery Store Nail Salon Pizza Place
230 Old Town Medical Center Bakery Cosmetics Shop Bank Italian Restaurant Chinese Restaurant Pizza Place Auto Dealership Doctor's Office Automotive Shop
232 Midland Beach Baseball Field General Travel Non-Profit Beach Pet Store Deli / Bodega Other Great Outdoors Pizza Place Salon / Barbershop Pool
233 Grant City Doctor's Office Cosmetics Shop Asian Restaurant Fast Food Restaurant Pizza Place Nail Salon Police Station General Entertainment Veterinarian Automotive Shop
234 New Dorp Beach General Entertainment Deli / Bodega Scenic Lookout Salon / Barbershop Italian Restaurant American Restaurant Sports Bar Men's Store Beach Other Great Outdoors
235 Bay Terrace, Staten Island Italian Restaurant Housing Development Gas Station Dentist's Office Doctor's Office Ice Cream Shop Elementary School Supermarket Salon / Barbershop General Entertainment
236 Huguenot Doctor's Office Salon / Barbershop Ice Cream Shop Deli / Bodega Other Great Outdoors Bank Asian Restaurant Pharmacy Sandwich Place Parking
238 Butler Manor Italian Restaurant Baseball Field Park School Beach Scenic Lookout Pool Dentist's Office Doctor's Office Gym / Fitness Center
239 Charleston Doctor's Office Salon / Barbershop Dentist's Office Shopping Mall Movie Theater Shoe Store Big Box Store Pizza Place Department Store Martial Arts School
240 Rossville General Entertainment Pizza Place Other Great Outdoors Bar Medical Center Athletics & Sports Automotive Shop Bookstore Pool Gym
241 Arden Heights Professional & Other Places Church Dentist's Office Doctor's Office Food Bridge Other Great Outdoors Moving Target Bar Italian Restaurant
244 Chelsea, Staten Island Ice Cream Shop Salon / Barbershop Automotive Shop Gym Church Miscellaneous Shop Other Great Outdoors Pet Service Bowling Alley Food
249 Civic Center Coworking Space Government Building Doctor's Office Food Truck Medical Center Lawyer Tech Startup Residential Building (Apartment / Condo) Mobile Phone Shop Dance Studio
250 Midtown South Taxi American Restaurant Food Stand Hotel Spa Event Space Jewelry Store Residential Building (Apartment / Condo) Metro Station Coffee Shop
251 Richmond Town Dentist's Office Italian Restaurant School Grocery Store Miscellaneous Shop Laundry Service High School Pet Store Event Space Deli / Bodega
253 Clifton Gas Station Pizza Place Hospital Automotive Shop Salon / Barbershop Mexican Restaurant Ice Cream Shop Other Great Outdoors Veterinarian Hardware Store
257 Howland Hook Boat or Ferry Food Factory Harbor / Marina Bar Automotive Shop Government Building Bridge Pizza Place Event Space
261 Paerdegat Basin Doctor's Office Salon / Barbershop Harbor / Marina Food School Cemetery Other Nightlife Lounge Caribbean Restaurant Chinese Restaurant
262 Mill Basin Dentist's Office Gas Station Salon / Barbershop Doctor's Office Chinese Restaurant Laundry Service Baseball Field Restaurant Nail Salon Bagel Shop
264 Utopia Automotive Shop Deli / Bodega Playground Laundry Service Elementary School Park School Basketball Court Synagogue Pharmacy
266 Astoria Heights Laundry Service Deli / Bodega Playground General Travel General Entertainment Gas Station Salon / Barbershop Chinese Restaurant Italian Restaurant Food
269 Mount Eden Automotive Shop Residential Building (Apartment / Condo) Spanish Restaurant Pizza Place Bar Doctor's Office Other Great Outdoors Church Gym Nightclub
272 Hunters Point Deli / Bodega Salon / Barbershop Plaza Yoga Studio Donut Shop Spa Thai Restaurant Restaurant Residential Building (Apartment / Condo) Pizza Place
276 Flatiron Tech Startup Clothing Store Sporting Goods Shop Gym / Fitness Center Furniture / Home Store Boutique Women's Store Taxi Cycle Studio Doctor's Office
278 Blissville Gas Station Hardware Store Deli / Bodega Automotive Shop Tech Startup Residential Building (Apartment / Condo) Factory Professional & Other Places School Bakery
279 Fulton Ferry Food Truck Pizza Place American Restaurant Park Boat or Ferry Scenic Lookout Beer Garden Ice Cream Shop Residential Building (Apartment / Condo) Bar
280 Vinegar Hill Tech Startup Art Gallery Residential Building (Apartment / Condo) Event Space General Entertainment Gym Massage Studio Bike Rental / Bike Share Middle School Factory
282 Broadway Junction High School Metro Station Automotive Shop Deli / Bodega Other Great Outdoors Coffee Shop Sandwich Place Playground Lounge Caribbean Restaurant
283 Dumbo Art Gallery Tech Startup Food Stand Event Space Food Truck Salon / Barbershop Coworking Space Spa Advertising Agency Bookstore
284 Manor Heights Doctor's Office Liquor Store Laundry Service Donut Shop Burger Joint Chinese Restaurant Miscellaneous Shop Salon / Barbershop Gas Station Nail Salon
285 Willowbrook Synagogue Church Deli / Bodega Laundry Service Salon / Barbershop Dance Studio Dog Run Spa General College & University Coworking Space
286 Sandy Ground General Entertainment Other Great Outdoors Elementary School Athletics & Sports Professional & Other Places Dentist's Office Art Gallery Doctor's Office Bookstore Salon / Barbershop
288 Roxbury Beach Bar Baseball Field Fire Station Hardware Store Theater Seafood Restaurant Taco Place Playground Food Truck
290 Middle Village Bakery Cosmetics Shop Chinese Restaurant Salon / Barbershop Health & Beauty Service Martial Arts School Beer Garden Thai Restaurant Miscellaneous Shop Nail Salon
291 Prince's Bay Salon / Barbershop Doctor's Office Church Dentist's Office Bank Other Great Outdoors Pizza Place Design Studio Gas Station Chinese Restaurant
292 Lighthouse Hill Italian Restaurant History Museum Church Bagel Shop Miscellaneous Shop Park Medical Center School Golf Course Salon / Barbershop
293 Richmond Valley Salon / Barbershop Bakery Fast Food Restaurant Automotive Shop Nail Salon Coffee Shop Convenience Store Pizza Place Dessert Shop Ice Cream Shop
294 Malba Park Chinese Restaurant Scenic Lookout Playground Trade School Food Truck Coworking Space Rock Club Nail Salon College Library
301 Hudson Yards Medical Center Furniture / Home Store Food Truck American Restaurant Pizza Place General Travel Donut Shop Tattoo Parlor Park Transportation Service
303 Bayswater Plane Church Salon / Barbershop Laundry Service Gas Station Fast Food Restaurant Field Automotive Shop Athletics & Sports Boutique
304 Queensbridge Hotel Miscellaneous Shop Deli / Bodega Storage Facility Chinese Restaurant Metro Station Residential Building (Apartment / Condo) Bakery Bike Rental / Bike Share Playground
In [35]:
nyc_merged.loc[nyc_merged['Cluster Labels'] == 2, 
               nyc_merged.columns[[1] + list(range(5, nyc_merged.shape[1]))]]
Out[35]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
8 Norwood Doctor's Office Park Deli / Bodega Residential Building (Apartment / Condo) Medical Center Food Truck School Salon / Barbershop Laundry Service Middle School
11 Pelham Parkway Doctor's Office Deli / Bodega Residential Building (Apartment / Condo) Dentist's Office Salon / Barbershop Diner Pizza Place Food Flower Shop Café
33 Morris Park Doctor's Office Residential Building (Apartment / Condo) Nail Salon Dentist's Office Ice Cream Shop Chinese Restaurant Church Salon / Barbershop Restaurant Real Estate Office
38 Schuylerville Doctor's Office Salon / Barbershop Deli / Bodega Professional & Other Places Pizza Place Pharmacy Mental Health Office Medical Lab Hardware Store Donut Shop
42 Pelham Gardens Doctor's Office Pharmacy Pizza Place Playground Other Great Outdoors Dentist's Office Gas Station Sandwich Place School Deli / Bodega
53 Manhattan Terrace Doctor's Office Dentist's Office Residential Building (Apartment / Condo) Parking Housing Development School Medical Center Professional & Other Places Café Chinese Restaurant
64 Brooklyn Heights Doctor's Office Residential Building (Apartment / Condo) School Women's Store Church Salon / Barbershop Laundry Service Flea Market Monument / Landmark Health & Beauty Service
73 Starrett City Doctor's Office Laundry Service Parking Residential Building (Apartment / Condo) Pharmacy Middle School Gym / Fitness Center Salon / Barbershop School College Academic Building
81 Dyker Heights Doctor's Office Salon / Barbershop Gas Station Dog Run Event Space Automotive Shop Deli / Bodega Bagel Shop Emergency Room Pet Store
94 Georgetown Doctor's Office Bank Medical Center Chinese Restaurant Salon / Barbershop Gas Station Medical Lab Supermarket Laundry Service Mobile Phone Shop
99 Fort Hamilton Doctor's Office Residential Building (Apartment / Condo) Pizza Place Deli / Bodega Laundry Service Salon / Barbershop Miscellaneous Shop Diner Automotive Shop Chinese Restaurant
107 Upper East Side Doctor's Office Art Gallery Residential Building (Apartment / Condo) Medical Center Dentist's Office Library Coffee Shop Spa High School Sculpture Garden
115 Murray Hill, Manhattan Doctor's Office Residential Building (Apartment / Condo) Dentist's Office Event Space Embassy / Consulate Spa Hotel Parking Gym Medical Center
126 Gramercy Doctor's Office Residential Building (Apartment / Condo) Medical Center Salon / Barbershop Dentist's Office Laundry Service Beer Garden College Arts Building Gourmet Shop Pharmacy
135 Forest Hills Dentist's Office Doctor's Office Residential Building (Apartment / Condo) Bank School Tech Startup Professional & Other Places Library Elementary School Convention Center
144 Glendale Doctor's Office Deli / Bodega Salon / Barbershop Chinese Restaurant Church Event Space Pizza Place Basketball Court School Park
145 Rego Park Doctor's Office Residential Building (Apartment / Condo) Medical Center Dentist's Office Professional & Other Places Indian Restaurant Spa General College & University Mediterranean Restaurant Bank
182 Holliswood Doctor's Office Gas Station Residential Building (Apartment / Condo) Salon / Barbershop Dentist's Office Bank Event Space Bagel Shop Professional & Other Places Donut Shop
187 Lindenwood Doctor's Office Dentist's Office Residential Building (Apartment / Condo) Bank Miscellaneous Shop Medical Center Deli / Bodega Weight Loss Center School Laundry Service
203 Todt Hill Doctor's Office Professional & Other Places Other Great Outdoors Bagel Shop Salon / Barbershop Dog Run Park Dentist's Office School New American Restaurant
204 South Beach Hospital Medical Center Doctor's Office Beach Dentist's Office BBQ Joint Gym College Communications Building College Auditorium Emergency Room
208 Castleton Corners Doctor's Office Church Dentist's Office Deli / Bodega Salon / Barbershop Medical Center Bakery Nail Salon Chiropractor Miscellaneous Shop
209 New Springville Doctor's Office Salon / Barbershop Bagel Shop Mobile Phone Shop Deli / Bodega Miscellaneous Shop Martial Arts School Flower Shop Chinese Restaurant Middle Eastern Restaurant
212 Oakwood Doctor's Office Dentist's Office Church Medical Center Other Great Outdoors Other Nightlife Chiropractor Elementary School Strip Club Martial Arts School
220 Sunnyside, Staten Island Doctor's Office Theater College Residence Hall Dance Studio College Library College Arts Building College Administrative Building College Lab Playground Indie Theater
231 Dongan Hills Deli / Bodega Doctor's Office Salon / Barbershop Bar Church Pet Store Residential Building (Apartment / Condo) Parking Garden Bowling Alley
242 Greenridge Doctor's Office Dentist's Office Professional & Other Places Asian Restaurant Taxi Laundry Service Fire Station Parking Bowling Alley Smoke Shop
243 Heartland Village Doctor's Office Salon / Barbershop Pizza Place Chinese Restaurant Dentist's Office Bagel Shop Professional & Other Places Cosmetics Shop Miscellaneous Shop Middle Eastern Restaurant
245 Bloomfield Doctor's Office Automotive Shop Baseball Field Sporting Goods Shop Grocery Store Other Great Outdoors General College & University Miscellaneous Shop Business Center Cosmetics Shop
246 Bulls Head Doctor's Office Pizza Place Bank Dentist's Office Church Cosmetics Shop Hospital Chinese Restaurant Salon / Barbershop Café
254 Concord Doctor's Office Deli / Bodega Bakery Salon / Barbershop Peruvian Restaurant Martial Arts School Medical Center Automotive Shop Other Great Outdoors Chinese Restaurant
255 Emerson Hill Doctor's Office Medical Center Church Residential Building (Apartment / Condo) College Library Spa College Administrative Building Lounge Scenic Lookout Market
256 Randall Manor Doctor's Office High School Residential Building (Apartment / Condo) Park College Classroom Medical Center Deli / Bodega Automotive Shop Liquor Store Pizza Place
265 Pomonok Doctor's Office Residential Building (Apartment / Condo) Playground Elementary School Salon / Barbershop Dentist's Office Library Other Nightlife Park Medical Center
274 Tudor City Doctor's Office Residential Building (Apartment / Condo) Medical Center Gym Laundry Service Hospital Veterinarian Train Station Assisted Living Lawyer
287 Egbertville Doctor's Office Salon / Barbershop Automotive Shop Trail Park Dentist's Office Scenic Lookout Lake Pizza Place Deli / Bodega
296 Madison Doctor's Office Residential Building (Apartment / Condo) Synagogue Dentist's Office Laundry Service High School Spa Student Center Food Medical Center
In [36]:
nyc_merged.loc[nyc_merged['Cluster Labels'] == 3, 
               nyc_merged.columns[[1] + list(range(5, nyc_merged.shape[1]))]]
Out[36]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
0 Wakefield Salon / Barbershop Laundry Service Coworking Space Church Doctor's Office Gas Station Food Residential Building (Apartment / Condo) Convenience Store Professional & Other Places
6 Marble Hill Deli / Bodega Salon / Barbershop High School Residential Building (Apartment / Condo) Laundry Service Furniture / Home Store Church Housing Development Wine Shop Mexican Restaurant
7 Woodlawn Bar Deli / Bodega Salon / Barbershop Pub Church Food & Drink Shop Pizza Place Convenience Store Gas Station Cosmetics Shop
9 Williamsbridge Church Salon / Barbershop Caribbean Restaurant School Spa Nightclub Nail Salon Professional & Other Places Pizza Place Restaurant
14 University Heights College Academic Building Deli / Bodega Salon / Barbershop Supermarket Bar Chinese Restaurant Moving Target Event Space Emergency Room College Administrative Building
17 East Tremont Salon / Barbershop Cosmetics Shop Food Church Shoe Store Chinese Restaurant Housing Development Dentist's Office Liquor Store Lounge
32 Van Nest Deli / Bodega Salon / Barbershop Laundry Service Nail Salon Pizza Place Bank Miscellaneous Shop Spanish Restaurant Chinese Restaurant Automotive Shop
34 Belmont Salon / Barbershop Deli / Bodega Italian Restaurant School Food Park Dessert Shop Bakery Laundry Service Pub
41 Olinville Salon / Barbershop Caribbean Restaurant Deli / Bodega Chinese Restaurant Residential Building (Apartment / Condo) Food Bakery Health & Beauty Service Liquor Store Automotive Shop
44 Unionport Salon / Barbershop Laundry Service Deli / Bodega Spanish Restaurant Other Nightlife Church Shoe Store Caribbean Restaurant Latin American Restaurant Food
56 East Flatbush Caribbean Restaurant Salon / Barbershop Deli / Bodega Chinese Restaurant Church Dentist's Office Fast Food Restaurant School Bar Food
71 Cypress Hills Salon / Barbershop Deli / Bodega Nail Salon Laundry Service Latin American Restaurant Pizza Place Non-Profit Fried Chicken Joint Chinese Restaurant Food
72 East New York Salon / Barbershop Deli / Bodega Laundry Service Nail Salon Church School Chinese Restaurant Spanish Restaurant Liquor Store Non-Profit
74 Canarsie Salon / Barbershop Caribbean Restaurant Chinese Restaurant Doctor's Office Deli / Bodega Nail Salon Grocery Store Hardware Store Lounge School
75 Flatlands Salon / Barbershop Automotive Shop Caribbean Restaurant Pharmacy Church Laundry Service Fried Chicken Joint Liquor Store Bar Discount Store
87 Boerum Hill Salon / Barbershop Doctor's Office General Entertainment Thrift / Vintage Store Event Space Residential Building (Apartment / Condo) Playground Boutique Garden Nail Salon
90 City Line Salon / Barbershop Nail Salon Miscellaneous Shop Chinese Restaurant Bakery Cosmetics Shop Convenience Store Deli / Bodega Laundry Service Food
102 Inwood Deli / Bodega Salon / Barbershop Nail Salon Residential Building (Apartment / Condo) Government Building Laundry Service Pharmacy Mexican Restaurant Bank Flower Shop
124 Manhattan Valley Deli / Bodega Salon / Barbershop Trailer Park Chinese Restaurant Laundry Service Check Cashing Service Indian Restaurant Residential Building (Apartment / Condo) Emergency Room Empanada Restaurant
130 Woodside Bar Salon / Barbershop Mexican Restaurant Platform Thai Restaurant Miscellaneous Shop Deli / Bodega Fast Food Restaurant Food Truck Health & Beauty Service
134 Corona Salon / Barbershop Mexican Restaurant Deli / Bodega Chinese Restaurant Restaurant Laundry Service Food Liquor Store Doctor's Office Bakery
141 East Elmhurst Salon / Barbershop Gas Station Plane Church Pizza Place Playground Conference Room Donut Shop Lounge Electronics Store
146 Woodhaven Deli / Bodega Salon / Barbershop Laundry Service Miscellaneous Shop Liquor Store Chinese Restaurant Doctor's Office Mexican Restaurant Dentist's Office Nail Salon
163 Hollis Salon / Barbershop Caribbean Restaurant Automotive Shop Baseball Field Bakery Laundry Service Fried Chicken Joint Church Chinese Restaurant Deli / Bodega
164 South Jamaica Automotive Shop Church Salon / Barbershop Non-Profit Pizza Place Laundry Service Rental Car Location Deli / Bodega Grocery Store Chinese Restaurant
165 St. Albans Salon / Barbershop Caribbean Restaurant Deli / Bodega Laundry Service Church Lounge Professional & Other Places Dance Studio Convenience Store Nail Salon
168 Cambria Heights Doctor's Office Caribbean Restaurant Salon / Barbershop Cosmetics Shop Dentist's Office Church Lounge Restaurant Bakery Mexican Restaurant
169 Rosedale Salon / Barbershop Caribbean Restaurant Gas Station Cosmetics Shop Laundry Service Fried Chicken Joint Miscellaneous Shop Church Food Chinese Restaurant
170 Far Rockaway Salon / Barbershop Deli / Bodega Automotive Shop Chinese Restaurant Nail Salon Mobile Phone Shop Pizza Place Cosmetics Shop Fast Food Restaurant Caribbean Restaurant
188 Laurelton Salon / Barbershop Caribbean Restaurant Gas Station Church Deli / Bodega Cosmetics Shop Automotive Shop Financial or Legal Service Nail Salon Park
194 Bellaire Salon / Barbershop Chinese Restaurant Deli / Bodega Pizza Place Hospital Gas Station Fast Food Restaurant Residential Building (Apartment / Condo) Automotive Shop School
195 North Corona Deli / Bodega Salon / Barbershop Mexican Restaurant Latin American Restaurant Food Truck Hotel Laundry Service Taco Place Church School
198 New Brighton Deli / Bodega Church Park Playground Laundry Service Housing Development Residential Building (Apartment / Condo) Pizza Place Convenience Store Laundromat
199 Stapleton Food Salon / Barbershop Church Pizza Place Deli / Bodega Bank Performing Arts Venue Government Building Tattoo Parlor Mexican Restaurant
213 Great Kills Salon / Barbershop Doctor's Office Nail Salon Pizza Place Italian Restaurant Bar Bakery Deli / Bodega Event Space Cosmetics Shop
218 Tompkinsville Salon / Barbershop Mexican Restaurant Caribbean Restaurant Pizza Place Church Grocery Store Deli / Bodega Laundry Service Flower Shop Elementary School
222 Wingate Salon / Barbershop School Event Space Deli / Bodega Caribbean Restaurant Food Lounge Hardware Store Automotive Shop Church
223 Rugby Caribbean Restaurant Salon / Barbershop Laundry Service Chinese Restaurant Food Deli / Bodega Elementary School Restaurant Design Studio Bakery
237 Pleasant Plains Salon / Barbershop Pizza Place Bakery Dessert Shop Moving Target Tanning Salon Bridge Spa Deli / Bodega Donut Shop
252 Shore Acres Deli / Bodega Italian Restaurant Salon / Barbershop Miscellaneous Shop Food Gas Station Chinese Restaurant Bar Pizza Place Dentist's Office
258 Elm Park Deli / Bodega Salon / Barbershop Restaurant Pizza Place Automotive Shop Italian Restaurant Nail Salon Bakery High School Laundry Service
259 Remsen Village Salon / Barbershop Church Automotive Shop Caribbean Restaurant Sandwich Place Food Laundry Service Fast Food Restaurant Post Office Liquor Store
260 New Lots Church Salon / Barbershop Deli / Bodega Grocery Store Chinese Restaurant Laundry Service Caribbean Restaurant Food Medical Center School
263 Jamaica Hills Salon / Barbershop Indian Restaurant Grocery Store Residential Building (Apartment / Condo) Asian Restaurant Chinese Restaurant Dentist's Office Bakery Gas Station Other Great Outdoors
267 Claremont Village Salon / Barbershop Medical Center Deli / Bodega Pizza Place Pharmacy Chinese Restaurant Cosmetics Shop Residential Building (Apartment / Condo) Church Caribbean Restaurant
270 Mount Hope Salon / Barbershop Residential Building (Apartment / Condo) Church Automotive Shop Chinese Restaurant Financial or Legal Service Deli / Bodega Hookah Bar Latin American Restaurant Doctor's Office
281 Weeksville Caribbean Restaurant Salon / Barbershop Automotive Shop Chinese Restaurant Residential Building (Apartment / Condo) Deli / Bodega Church Food Other Great Outdoors Fried Chicken Joint
289 Homecrest Salon / Barbershop Chinese Restaurant Asian Restaurant Bakery Eastern European Restaurant Deli / Bodega Russian Restaurant Grocery Store Hardware Store Electronics Store
295 Highland Park Salon / Barbershop Church Laundry Service Liquor Store Moving Target Metro Station Elementary School Deli / Bodega Asian Restaurant Food
298 Allerton Salon / Barbershop Laundry Service Food Pharmacy Pizza Place Gas Station Car Wash Non-Profit Funeral Home Automotive Shop
300 Erasmus Salon / Barbershop Caribbean Restaurant Bakery Bar Food Other Great Outdoors General Entertainment Intersection Fried Chicken Joint Lounge
In [37]:
nyc_merged.loc[nyc_merged['Cluster Labels'] == 4, 
               nyc_merged.columns[[1] + list(range(5, nyc_merged.shape[1]))]]
Out[37]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category 8th Most Common Category 9th Most Common Category 10th Most Common Category
1 Co-op City Residential Building (Apartment / Condo) School Other Great Outdoors Church Pharmacy Financial or Legal Service Liquor Store High School Laundry Service Parking
15 Morris Heights Residential Building (Apartment / Condo) Grocery Store Salon / Barbershop Convenience Store Church Deli / Bodega Spanish Restaurant Supermarket School Lounge
19 High Bridge Salon / Barbershop Residential Building (Apartment / Condo) Deli / Bodega Pharmacy Laundry Service Chinese Restaurant Food Restaurant Grocery Store Gas Station
20 Melrose Residential Building (Apartment / Condo) Laundry Service Salon / Barbershop Doctor's Office High School Deli / Bodega Housing Development Miscellaneous Shop Playground Garden
22 Port Morris Factory Residential Building (Apartment / Condo) Government Building Storage Facility Latin American Restaurant Bar Distillery Plane Hardware Store Warehouse
25 Morrisania Residential Building (Apartment / Condo) High School Church Chinese Restaurant Deli / Bodega Housing Development Dentist's Office Seafood Restaurant Medical Center Food
26 Soundview Residential Building (Apartment / Condo) Housing Development Laundry Service Chinese Restaurant Liquor Store Pizza Place Grocery Store Church School Deli / Bodega
30 Parkchester Salon / Barbershop Residential Building (Apartment / Condo) Laundry Service Indian Restaurant Convenience Store School Pizza Place Doctor's Office Deli / Bodega Asian Restaurant
43 Concourse Residential Building (Apartment / Condo) Salon / Barbershop Deli / Bodega Pizza Place Grocery Store Nail Salon Laundry Service Spanish Restaurant Caribbean Restaurant Pharmacy
45 Edenwald Salon / Barbershop Residential Building (Apartment / Condo) Church Liquor Store Deli / Bodega Gas Station Laundry Service Playground Housing Development Grocery Store
46 Bay Ridge Salon / Barbershop Residential Building (Apartment / Condo) Italian Restaurant Cosmetics Shop Spa Chinese Restaurant Deli / Bodega Pizza Place Greek Restaurant Financial or Legal Service
55 Crown Heights Residential Building (Apartment / Condo) Deli / Bodega Salon / Barbershop Pizza Place Laundry Service Lounge Grocery Store Pharmacy Fried Chicken Joint Music Venue
59 Prospect Heights Residential Building (Apartment / Condo) Deli / Bodega Mexican Restaurant Salon / Barbershop Thai Restaurant Coffee Shop Boutique Grocery Store General Entertainment Scenic Lookout
60 Brownsville Church Residential Building (Apartment / Condo) Deli / Bodega Housing Development School Park Middle School Medical Center Salon / Barbershop Laundry Service
61 Williamsburg Residential Building (Apartment / Condo) Pizza Place Salon / Barbershop Park Gym Chinese Restaurant Spa Bar Train American Restaurant
62 Bushwick Thrift / Vintage Store Deli / Bodega Residential Building (Apartment / Condo) Coffee Shop Bar Radio Station Food Garden Laundry Service Salon / Barbershop
65 Cobble Hill Residential Building (Apartment / Condo) Other Great Outdoors Medical Center Taxi Playground Church Hospital Ward Emergency Room Garden Doctor's Office
66 Carroll Gardens Residential Building (Apartment / Condo) Deli / Bodega Food Truck Convenience Store Laundry Service School Gift Shop Beer Garden Breakfast Spot Pilates Studio
69 Fort Greene Residential Building (Apartment / Condo) Deli / Bodega Art Gallery Yoga Studio Israeli Restaurant Student Center Scenic Lookout Restaurant Playground Pet Café
70 Park Slope Residential Building (Apartment / Condo) Toy / Game Store Laundry Service Deli / Bodega Nail Salon Japanese Restaurant Sporting Goods Shop Pizza Place Furniture / Home Store Flea Market
78 Coney Island Deli / Bodega Housing Development Residential Building (Apartment / Condo) Beach Medical Center Police Station Park Dessert Shop Event Space Chinese Restaurant
84 Clinton Hill Residential Building (Apartment / Condo) Liquor Store Miscellaneous Shop Deli / Bodega Restaurant Salon / Barbershop Seafood Restaurant Thai Restaurant Bank Mexican Restaurant
88 Prospect Lefferts Gardens Residential Building (Apartment / Condo) Salon / Barbershop Deli / Bodega Doctor's Office School Pizza Place Art Gallery Caribbean Restaurant Laundry Service Wine Shop
89 Ocean Hill Deli / Bodega Residential Building (Apartment / Condo) Salon / Barbershop Church Metro Station Laundry Service Elementary School School Nail Salon Food
92 Midwood Residential Building (Apartment / Condo) Doctor's Office Bakery Synagogue Gym / Fitness Center Pharmacy Flower Shop Café Miscellaneous Shop Coffee Shop
95 East Williamsburg Residential Building (Apartment / Condo) Deli / Bodega Art Gallery Music Venue Convenience Store Food Bar General Entertainment Café School
96 North Side Residential Building (Apartment / Condo) Bar Clothing Store Wine Bar Food Truck Nightclub Vegetarian / Vegan Restaurant Event Space Thrift / Vintage Store Liquor Store
97 South Side Residential Building (Apartment / Condo) Salon / Barbershop Indian Restaurant Tea Room Deli / Bodega Yoga Studio Dentist's Office Clothing Store Miscellaneous Shop General Entertainment
98 Ocean Parkway Residential Building (Apartment / Condo) Doctor's Office Coworking Space Assisted Living Dentist's Office Synagogue Non-Profit Grocery Store Automotive Shop Furniture / Home Store
103 Hamilton Heights Residential Building (Apartment / Condo) Salon / Barbershop Deli / Bodega Non-Profit Bar Laundry Service Church Italian Restaurant General Entertainment Playground
104 Manhattanville Residential Building (Apartment / Condo) College Administrative Building Salon / Barbershop Deli / Bodega General College & University University Bank Gas Station Food Truck Café
105 Central Harlem Salon / Barbershop Residential Building (Apartment / Condo) Mountain Gym / Fitness Center Nail Salon Deli / Bodega Juice Bar Church Non-Profit Cosmetics Shop
106 East Harlem Residential Building (Apartment / Condo) Pizza Place Clothing Store Bank Lawyer Hardware Store Doctor's Office Pharmacy Pet Store Cosmetics Shop
109 Lenox Hill Residential Building (Apartment / Condo) Salon / Barbershop Doctor's Office Nail Salon Art Gallery Grocery Store Shoe Store Italian Restaurant Spa Rental Car Location
110 Roosevelt Island Residential Building (Apartment / Condo) Church Taxi Laundry Service Art Gallery Rental Car Location Cosmetics Shop Gym / Fitness Center Restaurant Playground
111 Upper West Side Residential Building (Apartment / Condo) Nail Salon Shoe Store Cosmetics Shop Laundry Service Salon / Barbershop School Pizza Place Burger Joint Hardware Store
117 Greenwich Village Residential Building (Apartment / Condo) Taxi Art Gallery Salon / Barbershop Kids Store Clothing Store Italian Restaurant Ice Cream Shop Boutique Tech Startup
118 East Village Residential Building (Apartment / Condo) Salon / Barbershop Miscellaneous Shop American Restaurant Bakery Health & Beauty Service General Entertainment Clothing Store Church Ice Cream Shop
120 Tribeca Residential Building (Apartment / Condo) Food Truck Café American Restaurant General Entertainment Shoe Store Bar Bank Parking Furniture / Home Store
123 West Village Residential Building (Apartment / Condo) Cocktail Bar Salon / Barbershop Laundry Service Antique Shop Coffee Shop Chinese Restaurant Café Art Gallery Thrift / Vintage Store
127 Battery Park City Residential Building (Apartment / Condo) Boat or Ferry Park Harbor / Marina Metro Station Food Truck Plaza Bar Gym Dog Run
132 Elmhurst Residential Building (Apartment / Condo) Doctor's Office Thai Restaurant Bubble Tea Shop Dentist's Office Optical Shop Salon / Barbershop Campground Chinese Restaurant Laundry Service
136 Kew Gardens Residential Building (Apartment / Condo) Doctor's Office Dentist's Office Synagogue Laundry Service Taxi Pet Store Financial or Legal Service Gym Bakery
139 Long Island City Residential Building (Apartment / Condo) Deli / Bodega Pizza Place Café Coffee Shop Sandwich Place Government Building Bike Rental / Bike Share Scenic Lookout American Restaurant
140 Sunnyside, Queens Residential Building (Apartment / Condo) Pizza Place Deli / Bodega Laundry Service Salon / Barbershop Grocery Store Factory Nail Salon Automotive Shop Bakery
158 Fresh Meadows Residential Building (Apartment / Condo) School Salon / Barbershop Laundry Service Chinese Restaurant Pharmacy New American Restaurant Nail Salon Student Center Music School
178 Rockaway Beach Beach Residential Building (Apartment / Condo) Deli / Bodega Surf Spot Pizza Place Seafood Restaurant Bathing Area Physical Therapist School Medical Center
186 Ravenswood Residential Building (Apartment / Condo) Laundry Service Pharmacy Doctor's Office Grocery Store Bike Rental / Bike Share Church Deli / Bodega Dentist's Office School
202 Grymes Hill Residential Building (Apartment / Condo) Church College Administrative Building Dog Run Salon / Barbershop College & University Food Automotive Shop Laundry Service Historic Site
219 Silver Lake Residential Building (Apartment / Condo) College Library General College & University College Administrative Building Dance Studio College Classroom College Residence Hall Cemetery Scenic Lookout American Restaurant
224 Park Hill Residential Building (Apartment / Condo) Doctor's Office Salon / Barbershop Event Space Park Athletics & Sports Professional & Other Places Medical Center Housing Development Other Great Outdoors
247 Carnegie Hill Residential Building (Apartment / Condo) Salon / Barbershop Event Space Mexican Restaurant Food Spa Art Gallery Grocery Store General Entertainment Laundry Service
248 Noho Bar Residential Building (Apartment / Condo) Deli / Bodega Cocktail Bar Salon / Barbershop Nail Salon Coffee Shop General Entertainment Thai Restaurant Taxi
268 Concourse Village Deli / Bodega Residential Building (Apartment / Condo) Salon / Barbershop Chinese Restaurant Park Kingdom Hall Gas Station Church Convenience Store Coffee Shop
271 Sutton Place Residential Building (Apartment / Condo) Parking Taxi Gym / Fitness Center Yoga Studio Laundry Service Dentist's Office Diner Salon / Barbershop Park
273 Turtle Bay Government Building Embassy / Consulate Residential Building (Apartment / Condo) Doctor's Office Monument / Landmark Non-Profit Garden Tunnel Meeting Room College Administrative Building
277 Sunnyside Gardens Residential Building (Apartment / Condo) Laundry Service Nail Salon Grocery Store Spa Pizza Place Salon / Barbershop Doctor's Office Church Pub
297 Bronxdale Residential Building (Apartment / Condo) Deli / Bodega Doctor's Office Dentist's Office Chinese Restaurant Elementary School Metro Station Mexican Restaurant Health & Beauty Service High School
299 Kingsbridge Heights Residential Building (Apartment / Condo) Salon / Barbershop Pizza Place Deli / Bodega Mexican Restaurant Park Food Electronics Store Fried Chicken Joint Bar
302 Hammels Beach Residential Building (Apartment / Condo) Church Dog Run Chinese Restaurant Bakery General Entertainment Elementary School Automotive Shop Playground
305 Fox Hills Professional & Other Places Chinese Restaurant Residential Building (Apartment / Condo) Housing Development Salon / Barbershop Non-Profit Laundry Service Church Student Center Gas Station

2. Data for Toronto

2.1 Coordinates of neighborhoods in Toronto

Downloading and saving neighborhoods Data for Toronto

In [38]:
# !conda install -c anaconda lxml python=3.6 -y
In [39]:
# # # import pandas as pd
# tor_neighborhoodss = pd.read_html('https://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M')
# tor_neighborhoods  = tor_neighborhoodss[0] 
# # tor_neighborhoods.head()
# # tor_neighborhoods.to_pickle("./capstone_data/tor_nbhds.pkl")
# # tor_neighborhoods.head()
# # tor_neighborhoods.columns
# # # 

# tor_neighborhoods.to_csv('./capstone_data/tor_nbhds.csv',index=False)
In [40]:
tor_neighborhoods = pd.read_csv('./capstone_data/tor_nbhds.csv')
# tor_neighborhoods = pd.read_pickle("./capstone_data/tor_nbhds.pkl")
tor_neighborhoods.columns
Out[40]:
Index(['Postal Code', 'Borough', 'Neighbourhood'], dtype='object')
In [41]:
print('The dataframe has {} boroughs and {} neighborhoods.'.format(
        len(tor_neighborhoods['Borough'].unique()),
        tor_neighborhoods.shape[0]
    )
)
The dataframe has 11 boroughs and 180 neighborhoods.
In [42]:
tor_neighborhoods.columns = ['PostalCode', 'Borough', 'Neighborhood']
In [43]:
tor_neighborhoods.head()
Out[43]:
PostalCode Borough Neighborhood
0 M1A Not assigned Not assigned
1 M2A Not assigned Not assigned
2 M3A North York Parkwoods
3 M4A North York Victoria Village
4 M5A Downtown Toronto Regent Park, Harbourfront

Removing records where the borough is "not assigned"

In [44]:
indexNames = tor_neighborhoods[tor_neighborhoods['Borough'] == 'Not assigned'].index
indexNames
Out[44]:
Int64Index([  0,   1,   7,  10,  15,  16,  19,  24,  25,  28,  29,  33,  34,
             35,  37,  38,  42,  43,  44,  51,  52,  53,  60,  61,  62,  69,
             70,  71,  78,  79,  87,  88,  96,  97, 101, 105, 106, 110, 115,
            118, 119, 123, 124, 125, 127, 128, 131, 132, 133, 134, 136, 137,
            140, 141, 145, 146, 149, 150, 154, 155, 158, 159, 161, 162, 163,
            164, 166, 167, 170, 171, 172, 173, 174, 175, 176, 177, 179],
           dtype='int64')
In [45]:
tor_neighborhoods.drop(indexNames, inplace = True)

Merging records where multiple neighborhoods share the same borough

For example, there are two neighborhoods (Harbourfront and Regent Park) that share the same postal code and the same borough (Downtown Toronto) as shown below:

In [46]:
tor_neighborhoods[tor_neighborhoods.PostalCode == 'M5A']
Out[46]:
PostalCode Borough Neighborhood
4 M5A Downtown Toronto Regent Park, Harbourfront
In [47]:
tor_neighborhoods = (tor_neighborhoods.groupby(['PostalCode', 'Borough'])['Neighborhood']
      .apply(lambda x: "{}".format(', '.join(x))).reset_index())

Now let's take a look at the record of Downtown Toronto borough:

In [48]:
tor_neighborhoods[tor_neighborhoods.PostalCode == 'M5A']
Out[48]:
PostalCode Borough Neighborhood
53 M5A Downtown Toronto Regent Park, Harbourfront

Getting Latitude and Longitude Coordinates of the Neighborhoods

In [49]:
# !wget -O ./capstone_data/toronto_nbhds_coords.csv http://cocl.us/Geospatial_data
In [50]:
tor_lat_lng_df = pd.read_csv('./capstone_data/toronto_nbhds_coords.csv')
tor_lat_lng_df.head()
Out[50]:
Postal Code Latitude Longitude
0 M1B 43.806686 -79.194353
1 M1C 43.784535 -79.160497
2 M1E 43.763573 -79.188711
3 M1G 43.770992 -79.216917
4 M1H 43.773136 -79.239476

Adding latitude and longitude data to the neighborhood dataframe

In [51]:
tor_neighborhoods.reset_index(drop=True, inplace=True)
tor_neighborhoods['Latitude'] = -99999.9
tor_neighborhoods['Longitude'] = -99999.9

for i in range(tor_neighborhoods.shape[0]):
    postalcode = tor_neighborhoods.loc[i, 'PostalCode']
    lat = tor_lat_lng_df.loc[tor_lat_lng_df['Postal Code'] == postalcode, 'Latitude'].squeeze()
    lng = tor_lat_lng_df.loc[tor_lat_lng_df['Postal Code'] == postalcode, 'Longitude'].squeeze()
    tor_neighborhoods.loc[i, 'Latitude'] = lat
    tor_neighborhoods.loc[i, 'Longitude'] = lng    
In [52]:
tor_neighborhoods.head()
Out[52]:
PostalCode Borough Neighborhood Latitude Longitude
0 M1B Scarborough Malvern, Rouge 43.806686 -79.194353
1 M1C Scarborough Rouge Hill, Port Union, Highland Creek 43.784535 -79.160497
2 M1E Scarborough Guildwood, Morningside, West Hill 43.763573 -79.188711
3 M1G Scarborough Woburn 43.770992 -79.216917
4 M1H Scarborough Cedarbrae 43.773136 -79.239476
In [53]:
tor_neighborhoods.shape
Out[53]:
(103, 5)

Using geopy Library to get the coordinates of Toronto

In [54]:
address = 'Toronto'
geolocator = Nominatim(user_agent="ny_explorer")
location = geolocator.geocode(address)
latitude = location.latitude
longitude = location.longitude
print('The geograpical coordinate of Toronto are {}, {}.'.format(latitude, longitude))
The geograpical coordinate of Toronto are 43.6534817, -79.3839347.

Creating a map of Toronto with neighborhoods superimposed on top

In [55]:
map_toronto = folium.Map(location=[latitude, longitude], zoom_start=10,
                         min_zoom=9, max_zoom=11)

# add neighborhood markers to map
for lat, lng, borough, neighborhood in zip(tor_neighborhoods['Latitude'], tor_neighborhoods['Longitude'], 
                                           tor_neighborhoods['Borough'], tor_neighborhoods['Neighborhood']):
    label = '{}, {}'.format(neighborhood, borough)
    label = folium.Popup(label, parse_html=True)
    folium.CircleMarker(
        [lat, lng],
        radius=3,
        weight=2,
        popup=label,
        color='#333333',
        fill=True,
        fill_color='#388e3c',
        fill_opacity=0.7,
        parse_html=False).add_to(map_toronto)  
    
map_toronto
Out[55]:
Make this Notebook Trusted to load map: File -> Trust Notebook

2.2 Toronto Venue Data (Latitude, Longitude, Category)

Downloading and saving Venue Data For Toronto from Foursquare

In [56]:
# We only need to do this once.
# df_tor_nbhd = getNearbyVenues(names     = tor_neighborhoods['Neighborhood'],
#                              latitudes  = tor_neighborhoods['Latitude'],
#                              longitudes = tor_neighborhoods['Longitude']
#                             )

# df_tor_nbhd.to_csv('./capstone_data/tor_venues.csv',index=False)

Loading the saved data into a pandas dataframe

In [57]:
tor_venues = pd.read_csv("./capstone_data/tor_venues.csv")

# Removing records where venue is "building" or "office"
tor_venues = tor_venues[~tor_venues['Venue Category'].isin([
    'Building', 'Office', 'Bus Line', 'Bus Station', 'Bus Stop', 'Road'])]
print(tor_venues.shape)
tor_venues.head()
(7858, 7)
Out[57]:
Neighborhood Neighborhood Latitude Neighborhood Longitude Venue Venue Latitude Venue Longitude Venue Category
0 Malvern, Rouge 43.806686 -79.194353 Rouge Park - Woodland Trail 43.801782 -79.200427 Trail
1 Malvern, Rouge 43.806686 -79.194353 Alvin Curling Public School 43.808683 -79.190103 Elementary School
2 Malvern, Rouge 43.806686 -79.194353 Shell 43.803227 -79.192414 Gas Station
4 Malvern, Rouge 43.806686 -79.194353 Pleasant Corner 43.801164 -79.200254 Shopping Mall
5 Malvern, Rouge 43.806686 -79.194353 FASTSIGNS 43.807882 -79.201968 Business Service

Let's check how many venues were returned for each neighborhood

In [58]:
tor_venues.groupby('Neighborhood').size()
Out[58]:
Neighborhood
Agincourt                                                                                                                                  80
Alderwood, Long Branch                                                                                                                     81
Bathurst Manor, Wilson Heights, Downsview North                                                                                            82
Bayview Village                                                                                                                            79
Bedford Park, Lawrence Manor East                                                                                                          87
Berczy Park                                                                                                                                65
Birch Cliff, Cliffside West                                                                                                                74
Brockton, Parkdale Village, Exhibition Place                                                                                               65
Business reply mail Processing Centre, South Central Letter Processing Plant Toronto                                                       71
CN Tower, King and Spadina, Railway Lands, Harbourfront West, Bathurst Quay, South Niagara, Island airport                                 98
Caledonia-Fairbanks                                                                                                                        83
Canada Post Gateway Processing Centre                                                                                                      56
Cedarbrae                                                                                                                                  78
Central Bay Street                                                                                                                         90
Christie                                                                                                                                   78
Church and Wellesley                                                                                                                       79
Clarks Corners, Tam O'Shanter, Sullivan                                                                                                    86
Cliffside, Cliffcrest, Scarborough Village West                                                                                            88
Commerce Court, Victoria Hotel                                                                                                             73
Davisville                                                                                                                                 80
Davisville North                                                                                                                           65
Del Ray, Mount Dennis, Keelsdale and Silverthorn                                                                                           75
Don Mills                                                                                                                                 137
Dorset Park, Wexford Heights, Scarborough Town Centre                                                                                      89
Downsview                                                                                                                                 311
Dufferin, Dovercourt Village                                                                                                               86
East Toronto, Broadview North (Old East York)                                                                                              71
Eringate, Bloordale Gardens, Old Burnhamthorpe, Markland Wood                                                                              80
Fairview, Henry Farm, Oriole                                                                                                               94
First Canadian Place, Underground city                                                                                                     89
Forest Hill North & West, Forest Hill Road Park                                                                                            68
Garden District, Ryerson                                                                                                                   90
Glencairn                                                                                                                                  80
Golden Mile, Clairlea, Oakridge                                                                                                            72
Guildwood, Morningside, West Hill                                                                                                          60
Harbourfront East, Union Station, Toronto Islands                                                                                          57
High Park, The Junction South                                                                                                              38
Hillcrest Village                                                                                                                          88
Humber Summit                                                                                                                              77
Humberlea, Emery                                                                                                                           68
Humewood-Cedarvale                                                                                                                         64
India Bazaar, The Beaches West                                                                                                             82
Islington Avenue, Humber Valley Village                                                                                                    51
Kennedy Park, Ionview, East Birchmount Park                                                                                                82
Kensington Market, Chinatown, Grange Park                                                                                                  92
Kingsview Village, St. Phillips, Martin Grove Gardens, Richview Gardens                                                                    67
Lawrence Manor, Lawrence Heights                                                                                                           86
Lawrence Park                                                                                                                              71
Leaside                                                                                                                                    90
Little Portugal, Trinity                                                                                                                   88
Malvern, Rouge                                                                                                                             81
Milliken, Agincourt North, Steeles East, L'Amoreaux East                                                                                   59
Mimico NW, The Queensway West, South of Bloor, Kingsway Park South West, Royal York South West                                             84
Moore Park, Summerhill East                                                                                                                71
New Toronto, Mimico South, Humber Bay Shores                                                                                               75
North Park, Maple Leaf Park, Upwood Park                                                                                                   75
North Toronto West, Lawrence Park                                                                                                          81
Northwest, West Humber - Clairville                                                                                                        70
Northwood Park, York University                                                                                                            76
Old Mill South, King's Mill Park, Sunnylea, Humber Bay, Mimico NE, The Queensway East, Royal York South East, Kingsway Park South East     50
Parkdale, Roncesvalles                                                                                                                     78
Parkview Hill, Woodbine Gardens                                                                                                            71
Parkwoods                                                                                                                                  75
Queen's Park, Ontario Provincial Government                                                                                                66
Regent Park, Harbourfront                                                                                                                  77
Richmond, Adelaide, King                                                                                                                   83
Rosedale                                                                                                                                   69
Roselawn                                                                                                                                   61
Rouge Hill, Port Union, Highland Creek                                                                                                     78
Runnymede, Swansea                                                                                                                         89
Runnymede, The Junction North                                                                                                              90
Scarborough Village                                                                                                                        82
South Steeles, Silverstone, Humbergate, Jamestown, Mount Olive, Beaumond Heights, Thistletown, Albion Gardens                              94
St. James Town                                                                                                                             72
St. James Town, Cabbagetown                                                                                                                86
Steeles West, L'Amoreaux West                                                                                                              93
Stn A PO Boxes                                                                                                                             39
Studio District                                                                                                                            78
Summerhill West, Rathnelly, South Hill, Forest Hill SE, Deer Park                                                                          68
The Annex, North Midtown, Yorkville                                                                                                        73
The Beaches                                                                                                                                81
The Danforth West, Riverdale                                                                                                               91
The Kingsway, Montgomery Road, Old Mill North                                                                                              81
Thorncliffe Park                                                                                                                           85
Toronto Dominion Centre, Design Exchange                                                                                                   74
University of Toronto, Harbord                                                                                                             91
Upper Rouge                                                                                                                                74
Victoria Village                                                                                                                           77
West Deane Park, Princess Gardens, Martin Grove, Islington, Cloverdale                                                                     68
Westmount                                                                                                                                  86
Weston                                                                                                                                     85
Wexford, Maryvale                                                                                                                          85
Willowdale, Newtonbrook                                                                                                                    82
Willowdale, Willowdale East                                                                                                                90
Willowdale, Willowdale West                                                                                                                65
Woburn                                                                                                                                     78
Woodbine Heights                                                                                                                           62
York Mills West                                                                                                                            76
York Mills, Silver Hills                                                                                                                   42
dtype: int64
In [59]:
tor_neighborhoods['Neighborhood'].unique().shape[0], tor_venues['Neighborhood'].unique().shape[0]
Out[59]:
(99, 99)
In [60]:
# In case Foursquare does not return any venue for some neighborhoods.
tor_excluded_neighborhoods = set(tor_neighborhoods['Neighborhood']).difference(set(tor_venues['Neighborhood']))
tor_excluded_neighborhoods
Out[60]:
set()

Let's find out how many unique categories can be curated from all the returned venues

In [61]:
print('There are {} uniques categories.'.format(len(tor_venues['Venue Category'].unique())))
There are 508 uniques categories.

Performing one-hot encoding on the Venue Category variable

In [62]:
'Neighborhood' in tor_venues['Venue Category'].unique()
Out[62]:
False
In [63]:
# one hot encoding
tor_onehot = pd.get_dummies(tor_venues[['Venue Category']], prefix="", prefix_sep="")

# # add neighborhood column back to dataframe
# # we used Neighborhood_" instead of just "Neighborhood" because
# # there is a venue category called "Neighborhood"
# tor_onehot['Neighborhood_'] = tor_venues['Neighborhood'] 
tor_onehot['Neighborhood'] = tor_venues['Neighborhood'] 

# move neighborhood column to the first column
fixed_columns = [tor_onehot.columns[-1]] + list(tor_onehot.columns[:-1])
tor_onehot = tor_onehot[fixed_columns]

tor_onehot.head()
Out[63]:
Neighborhood ATM Accessories Store Acupuncturist Adult Boutique Advertising Agency Afghan Restaurant African Restaurant Airport Airport Food Court Airport Gate Airport Lounge Airport Service Airport Terminal Alternative Healer American Restaurant Animal Shelter Antique Shop Aquarium Arcade Argentinian Restaurant Art Gallery Art Studio Arts & Crafts Store Arts & Entertainment Asian Restaurant Assisted Living Athletics & Sports Auditorium Auto Dealership Auto Garage Auto Workshop Automotive Shop BBQ Joint Baby Store Badminton Court Bagel Shop Baggage Claim Bakery Ballroom Bank Bar Baseball Field Basketball Court Beach Bed & Breakfast Beer Bar Beer Garden Beer Store Belgian Restaurant Big Box Store Bike Rental / Bike Share Bike Shop Bike Trail Bistro Blood Donation Center Board Shop Boat or Ferry Bookstore Boutique Bowling Alley Boxing Gym Breakfast Spot Brewery Bridal Shop Bridge Bubble Tea Shop Buffet Burger Joint Burmese Restaurant Burrito Place Business Center Business Service Butcher Cable Car Cafeteria Café Cajun / Creole Restaurant Cambodian Restaurant Camera Store Campaign Office Campground Candy Store Cantonese Restaurant Capitol Building Car Wash Caribbean Restaurant Carpet Store Casino Cemetery Cha Chaan Teng Cheese Shop Chinese Breakfast Place Chinese Restaurant Chiropractor Chocolate Shop Church City Hall Clothing Store Club House Cocktail Bar Coffee Shop College & University College Academic Building College Administrative Building College Arts Building College Auditorium College Bookstore College Cafeteria College Classroom College Communications Building College Engineering Building College Football Field College Gym College History Building College Hockey Rink College Lab College Library College Math Building College Rec Center College Residence Hall College Science Building College Soccer Field College Stadium College Technology Building College Theater College Track Comedy Club Comfort Food Restaurant Comic Shop Community Center Community College Concert Hall Conference Room Construction & Landscaping Convenience Store Convention Center Cooking School Corporate Cafeteria Cosmetics Shop Costume Shop Country Dance Club Courthouse Coworking Space Credit Union Cuban Restaurant Cultural Center Cupcake Shop Currency Exchange Dance Studio Daycare Deli / Bodega Dentist's Office Department Store Design Studio Dessert Shop Dim Sum Restaurant Diner Discount Store Distribution Center Dive Bar Doctor's Office Dog Run Donut Shop Driving School Drugstore Dry Cleaner Dumpling Restaurant EV Charging Station Eastern European Restaurant Electronics Store Elementary School Embassy / Consulate Emergency Room English Restaurant Entertainment Service Escape Room Ethiopian Restaurant Event Space Eye Doctor Fabric Shop Factory Falafel Restaurant Farm Farmers Market Fast Food Restaurant Field Filipino Restaurant Film Studio Financial or Legal Service Fire Station Fireworks Store Fish & Chips Shop Fish Market Flea Market Flight School Flower Shop Food Food & Drink Shop Food Court Food Service Food Stand Food Truck Frame Store Fraternity House French Restaurant Fried Chicken Joint Frozen Yogurt Shop Fruit & Vegetable Store Funeral Home Furniture / Home Store Gaming Cafe Garden Garden Center Gas Station Gastropub Gay Bar General College & University General Entertainment General Travel German Restaurant Gift Shop Gluten-free Restaurant Golf Course Golf Driving Range Gourmet Shop Government Building Greek Restaurant Grocery Store Gym Gym / Fitness Center Gym Pool Hakka Restaurant Halal Restaurant Harbor / Marina Hardware Store Health & Beauty Service Health Food Store Herbs & Spices Store High School Hindu Temple Historic Site History Museum Hobby Shop Hockey Arena Home Service Hookah Bar Hospital Hospital Ward Hostel Hot Dog Joint Hotel Hotel Bar Housing Development Hungarian Restaurant IT Services Ice Cream Shop Indian Restaurant Indie Movie Theater Indie Theater Industrial Estate Insurance Office Intersection Irish Pub Italian Restaurant Japanese Restaurant Jewelry Store Jewish Restaurant Juice Bar Karaoke Bar Kebab Restaurant Kids Store Kingdom Hall Kitchen Supply Store Korean BBQ Restaurant Korean Restaurant Lake Language School Latin American Restaurant Laundromat Laundry Service Lawyer Library Light Rail Station Lighthouse Lighting Store Lingerie Store Liquor Store Locksmith Lottery Retailer Lounge Luggage Store Mac & Cheese Joint Marijuana Dispensary Market Martial Arts School Massage Studio Maternity Clinic Mattress Store Medical Center Medical Lab Medical School Medical Supply Store Mediterranean Restaurant Meeting Room Men's Store Mental Health Office Metro Station Mexican Restaurant Middle Eastern Restaurant Middle School Mini Golf Miscellaneous Shop Mobile Phone Shop Mobility Store Modern European Restaurant Monument / Landmark Moroccan Restaurant Mosque Motel Motorcycle Shop Mountain Movie Theater Moving Target Museum Music School Music Store Music Venue Nail Salon National Park New American Restaurant Newsagent Newsstand Nightclub Nightlife Spot Non-Profit Noodle House North Indian Restaurant Nursery School Opera House Optical Shop Organic Grocery Other Great Outdoors Other Nightlife Other Repair Shop Outdoor Sculpture Outdoor Supply Store Outdoors & Recreation Paper / Office Supplies Store Park Parking Pastry Shop Pawn Shop Peking Duck Restaurant Performing Arts Venue Perfume Shop Persian Restaurant Pet Service Pet Store Pharmacy Photography Lab Photography Studio Physical Therapist Piano Bar Pier Pilates Studio Pizza Place Plane Playground Plaza Police Station Pool Pool Hall Pop-Up Shop Portuguese Restaurant Post Office Poutine Place Power Plant Prayer Room Print Shop Private School Professional & Other Places Pub Public Art Racetrack Radio Station Ramen Restaurant Real Estate Office Record Shop Recording Studio Recreation Center Recruiting Agency Recycling Facility Rehab Center Rental Car Location Rental Service Research Laboratory Residential Building (Apartment / Condo) Resort Rest Area Restaurant River Rock Climbing Spot Rock Club Roof Deck Sake Bar Salad Place Salon / Barbershop Sandwich Place Scenic Lookout School Sculpture Garden Seafood Restaurant Shawarma Place Shipping Store Shoe Repair Shoe Store Shop & Service Shopping Mall Shopping Plaza Skate Park Skating Rink Ski Area Ski Chalet Ski Lodge Smoke Shop Smoothie Shop Snack Place Soccer Field Social Club Soup Place South Indian Restaurant Spa Speakeasy Spiritual Center Sporting Goods Shop Sports Bar Sports Club Sri Lankan Restaurant Stables State / Provincial Park Stationery Store Steakhouse Storage Facility Street Art Strip Club Student Center Summer Camp Supermarket Supplement Shop Surf Spot Sushi Restaurant Swim School Swiss Restaurant Synagogue Szechuan Restaurant Taco Place Tailor Shop Tanning Salon Tapas Restaurant Tattoo Parlor Taxi Taxi Stand Tea Room Tech Startup Temple Tennis Court Thai Restaurant Theater Theme Park Theme Park Ride / Attraction Theme Restaurant Thrift / Vintage Store Tibetan Restaurant Tourist Information Center Toy / Game Store Trade School Trail Trailer Park Train Train Station Tram Station Transportation Service Travel Agency Travel Lounge Tree Tunnel Turkish Restaurant University Vegetarian / Vegan Restaurant Veterinarian Video Game Store Video Store Vietnamese Restaurant Vineyard Volleyball Court Voting Booth Warehouse Warehouse Store Watch Shop Water Park Wine Bar Wine Shop Winery Wings Joint Women's Store Yoga Studio Zoo Zoo Exhibit
0 Malvern, Rouge 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 Malvern, Rouge 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 Malvern, Rouge 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 Malvern, Rouge 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 Malvern, Rouge 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Grouping rows by neighborhood and taking the mean of the frequency of occurrence of each category for each neighborhood

In [64]:
# tor_grouped = tor_onehot.groupby('Neighborhood_').mean().reset_index()
tor_grouped = tor_onehot.groupby('Neighborhood').mean().reset_index()
tor_grouped.head()
Out[64]:
Neighborhood ATM Accessories Store Acupuncturist Adult Boutique Advertising Agency Afghan Restaurant African Restaurant Airport Airport Food Court Airport Gate Airport Lounge Airport Service Airport Terminal Alternative Healer American Restaurant Animal Shelter Antique Shop Aquarium Arcade Argentinian Restaurant Art Gallery Art Studio Arts & Crafts Store Arts & Entertainment Asian Restaurant Assisted Living Athletics & Sports Auditorium Auto Dealership Auto Garage Auto Workshop Automotive Shop BBQ Joint Baby Store Badminton Court Bagel Shop Baggage Claim Bakery Ballroom Bank Bar Baseball Field Basketball Court Beach Bed & Breakfast Beer Bar Beer Garden Beer Store Belgian Restaurant Big Box Store Bike Rental / Bike Share Bike Shop Bike Trail Bistro Blood Donation Center Board Shop Boat or Ferry Bookstore Boutique Bowling Alley Boxing Gym Breakfast Spot Brewery Bridal Shop Bridge Bubble Tea Shop Buffet Burger Joint Burmese Restaurant Burrito Place Business Center Business Service Butcher Cable Car Cafeteria Café Cajun / Creole Restaurant Cambodian Restaurant Camera Store Campaign Office Campground Candy Store Cantonese Restaurant Capitol Building Car Wash Caribbean Restaurant Carpet Store Casino Cemetery Cha Chaan Teng Cheese Shop Chinese Breakfast Place Chinese Restaurant Chiropractor Chocolate Shop Church City Hall Clothing Store Club House Cocktail Bar Coffee Shop College & University College Academic Building College Administrative Building College Arts Building College Auditorium College Bookstore College Cafeteria College Classroom College Communications Building College Engineering Building College Football Field College Gym College History Building College Hockey Rink College Lab College Library College Math Building College Rec Center College Residence Hall College Science Building College Soccer Field College Stadium College Technology Building College Theater College Track Comedy Club Comfort Food Restaurant Comic Shop Community Center Community College Concert Hall Conference Room Construction & Landscaping Convenience Store Convention Center Cooking School Corporate Cafeteria Cosmetics Shop Costume Shop Country Dance Club Courthouse Coworking Space Credit Union Cuban Restaurant Cultural Center Cupcake Shop Currency Exchange Dance Studio Daycare Deli / Bodega Dentist's Office Department Store Design Studio Dessert Shop Dim Sum Restaurant Diner Discount Store Distribution Center Dive Bar Doctor's Office Dog Run Donut Shop Driving School Drugstore Dry Cleaner Dumpling Restaurant EV Charging Station Eastern European Restaurant Electronics Store Elementary School Embassy / Consulate Emergency Room English Restaurant Entertainment Service Escape Room Ethiopian Restaurant Event Space Eye Doctor Fabric Shop Factory Falafel Restaurant Farm Farmers Market Fast Food Restaurant Field Filipino Restaurant Film Studio Financial or Legal Service Fire Station Fireworks Store Fish & Chips Shop Fish Market Flea Market Flight School Flower Shop Food Food & Drink Shop Food Court Food Service Food Stand Food Truck Frame Store Fraternity House French Restaurant Fried Chicken Joint Frozen Yogurt Shop Fruit & Vegetable Store Funeral Home Furniture / Home Store Gaming Cafe Garden Garden Center Gas Station Gastropub Gay Bar General College & University General Entertainment General Travel German Restaurant Gift Shop Gluten-free Restaurant Golf Course Golf Driving Range Gourmet Shop Government Building Greek Restaurant Grocery Store Gym Gym / Fitness Center Gym Pool Hakka Restaurant Halal Restaurant Harbor / Marina Hardware Store Health & Beauty Service Health Food Store Herbs & Spices Store High School Hindu Temple Historic Site History Museum Hobby Shop Hockey Arena Home Service Hookah Bar Hospital Hospital Ward Hostel Hot Dog Joint Hotel Hotel Bar Housing Development Hungarian Restaurant IT Services Ice Cream Shop Indian Restaurant Indie Movie Theater Indie Theater Industrial Estate Insurance Office Intersection Irish Pub Italian Restaurant Japanese Restaurant Jewelry Store Jewish Restaurant Juice Bar Karaoke Bar Kebab Restaurant Kids Store Kingdom Hall Kitchen Supply Store Korean BBQ Restaurant Korean Restaurant Lake Language School Latin American Restaurant Laundromat Laundry Service Lawyer Library Light Rail Station Lighthouse Lighting Store Lingerie Store Liquor Store Locksmith Lottery Retailer Lounge Luggage Store Mac & Cheese Joint Marijuana Dispensary Market Martial Arts School Massage Studio Maternity Clinic Mattress Store Medical Center Medical Lab Medical School Medical Supply Store Mediterranean Restaurant Meeting Room Men's Store Mental Health Office Metro Station Mexican Restaurant Middle Eastern Restaurant Middle School Mini Golf Miscellaneous Shop Mobile Phone Shop Mobility Store Modern European Restaurant Monument / Landmark Moroccan Restaurant Mosque Motel Motorcycle Shop Mountain Movie Theater Moving Target Museum Music School Music Store Music Venue Nail Salon National Park New American Restaurant Newsagent Newsstand Nightclub Nightlife Spot Non-Profit Noodle House North Indian Restaurant Nursery School Opera House Optical Shop Organic Grocery Other Great Outdoors Other Nightlife Other Repair Shop Outdoor Sculpture Outdoor Supply Store Outdoors & Recreation Paper / Office Supplies Store Park Parking Pastry Shop Pawn Shop Peking Duck Restaurant Performing Arts Venue Perfume Shop Persian Restaurant Pet Service Pet Store Pharmacy Photography Lab Photography Studio Physical Therapist Piano Bar Pier Pilates Studio Pizza Place Plane Playground Plaza Police Station Pool Pool Hall Pop-Up Shop Portuguese Restaurant Post Office Poutine Place Power Plant Prayer Room Print Shop Private School Professional & Other Places Pub Public Art Racetrack Radio Station Ramen Restaurant Real Estate Office Record Shop Recording Studio Recreation Center Recruiting Agency Recycling Facility Rehab Center Rental Car Location Rental Service Research Laboratory Residential Building (Apartment / Condo) Resort Rest Area Restaurant River Rock Climbing Spot Rock Club Roof Deck Sake Bar Salad Place Salon / Barbershop Sandwich Place Scenic Lookout School Sculpture Garden Seafood Restaurant Shawarma Place Shipping Store Shoe Repair Shoe Store Shop & Service Shopping Mall Shopping Plaza Skate Park Skating Rink Ski Area Ski Chalet Ski Lodge Smoke Shop Smoothie Shop Snack Place Soccer Field Social Club Soup Place South Indian Restaurant Spa Speakeasy Spiritual Center Sporting Goods Shop Sports Bar Sports Club Sri Lankan Restaurant Stables State / Provincial Park Stationery Store Steakhouse Storage Facility Street Art Strip Club Student Center Summer Camp Supermarket Supplement Shop Surf Spot Sushi Restaurant Swim School Swiss Restaurant Synagogue Szechuan Restaurant Taco Place Tailor Shop Tanning Salon Tapas Restaurant Tattoo Parlor Taxi Taxi Stand Tea Room Tech Startup Temple Tennis Court Thai Restaurant Theater Theme Park Theme Park Ride / Attraction Theme Restaurant Thrift / Vintage Store Tibetan Restaurant Tourist Information Center Toy / Game Store Trade School Trail Trailer Park Train Train Station Tram Station Transportation Service Travel Agency Travel Lounge Tree Tunnel Turkish Restaurant University Vegetarian / Vegan Restaurant Veterinarian Video Game Store Video Store Vietnamese Restaurant Vineyard Volleyball Court Voting Booth Warehouse Warehouse Store Watch Shop Water Park Wine Bar Wine Shop Winery Wings Joint Women's Store Yoga Studio Zoo Zoo Exhibit
0 Agincourt 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.000000 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 0.025000 0.025 0.0125 0.175000 0.000000 0.0 0.0125 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012500 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.025000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.025000 0.0125 0.0 0.037500 0.0 0.0125 0.0 0.0 0.037500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.012500 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.012500 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.025000 0.0 0.0 0.025 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.025000 0.0 0.0 0.000000 0.025000 0.0 0.0 0.0 0.025000 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.012500 0.0 0.012500 0.012500 0.000000 0.0 0.0 0.0 0.0 0.025000 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.012500 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.0 0.0125 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0125 0.012500 0.0 0.000000 0.0125 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.012500 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.0125 0.0125 0.0 0.0 0.012500 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0375 0.0 0.0 0.0 0.0125 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.000000 0.025 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.012500 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0375 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.00000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0
1 Alderwood, Long Branch 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.012346 0.012346 0.0 0.012346 0.000000 0.012346 0.000000 0.012346 0.000 0.0000 0.012346 0.024691 0.0 0.0000 0.0 0.0 0.000000 0.0 0.037037 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.012346 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012346 0.0 0.000000 0.0 0.0 0.0 0.012346 0.012346 0.0 0.0 0.000000 0.0 0.0 0.0 0.024691 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0000 0.0 0.000000 0.0 0.0000 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.037037 0.0 0.037037 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.012346 0.0 0.0 0.0 0.000000 0.0 0.012346 0.037037 0.012346 0.037037 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.012346 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.012346 0.0 0.0 0.000000 0.037037 0.0 0.0 0.0 0.012346 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.012346 0.012346 0.0 0.0 0.0 0.0 0.012346 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012346 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.012346 0.012346 0.012346 0.012346 0.0 0.0 0.0 0.012346 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0000 0.037037 0.0 0.000000 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.012346 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.012346 0.0 0.012346 0.0000 0.0000 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.024691 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.012346 0.024691 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.000 0.012346 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.037037 0.012346 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.012346 0.012346 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.037037 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.012346 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.00000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0
2 Bathurst Manor, Wilson Heights, Downsview North 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.012195 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 0.012195 0.000000 0.000 0.0000 0.012195 0.000000 0.0 0.0000 0.0 0.0 0.000000 0.0 0.048780 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.012195 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.012195 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0000 0.0 0.012195 0.0 0.0000 0.0 0.0 0.024390 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.024390 0.0 0.0 0.0 0.012195 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.012195 0.012195 0.0 0.000000 0.0 0.0 0.012195 0.0 0.0 0.0 0.085366 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.012195 0.0 0.0 0.000000 0.0 0.0 0.000000 0.012195 0.0 0.0 0.0 0.000000 0.000000 0.0 0.012195 0.000000 0.0 0.0 0.0 0.012195 0.0 0.012195 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012195 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.000000 0.0 0.036585 0.000000 0.0 0.0 0.0 0.0 0.012195 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.0000 0.000000 0.036585 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0000 0.060976 0.0 0.012195 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.012195 0.0 0.0 0.012195 0.012195 0.0 0.0 0.012195 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.012195 0.0 0.000000 0.0000 0.0000 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.012195 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.012195 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.000 0.000000 0.0 0.060976 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.036585 0.012195 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012195 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.036585 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.012195 0.0 0.0 0.04878 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.012195 0.0 0.0
3 Bayview Village 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.000000 0.0 0.012658 0.012658 0.000000 0.000000 0.000000 0.000 0.0000 0.012658 0.000000 0.0 0.0000 0.0 0.0 0.000000 0.0 0.037975 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.025316 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0000 0.0 0.063291 0.0 0.0000 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.012658 0.000000 0.0 0.012658 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.012658 0.0 0.0 0.0 0.000000 0.0 0.012658 0.012658 0.000000 0.012658 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.063291 0.037975 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.012658 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.025316 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.0 0.037975 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.012658 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.025316 0.0 0.000000 0.025316 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.0000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0000 0.025316 0.0 0.000000 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.012658 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.012658 0.0 0.000000 0.0000 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.025316 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.025316 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.000000 0.025316 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.025316 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.012658 0.000 0.000000 0.0 0.025316 0.0 0.0 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.063291 0.000000 0.0 0.025316 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012658 0.012658 0.012658 0.012658 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.012658 0.0 0.0 0.00000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012658 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0
4 Bedford Park, Lawrence Manor East 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000 0.0000 0.000000 0.000000 0.0 0.0000 0.0 0.0 0.011494 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.0 0.000000 0.0 0.0 0.0 0.0 0.022989 0.0 0.0 0.011494 0.0 0.011494 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.011494 0.0 0.0 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0000 0.0 0.011494 0.0 0.0000 0.0 0.0 0.022989 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.0 0.0 0.0 0.000000 0.000000 0.0 0.011494 0.0 0.0 0.0 0.022989 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.022989 0.0 0.000000 0.000000 0.000000 0.022989 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.011494 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.022989 0.0 0.0 0.011494 0.022989 0.0 0.0 0.0 0.000000 0.011494 0.0 0.011494 0.011494 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.011494 0.011494 0.000000 0.0 0.000000 0.0 0.0 0.0 0.022989 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.011494 0.011494 0.0 0.0 0.0 0.0 0.000000 0.0 0.057471 0.011494 0.011494 0.011494 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.000000 0.022989 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0000 0.034483 0.0 0.000000 0.0000 0.0 0.0 0.011494 0.0 0.0 0.0 0.000000 0.0 0.0 0.011494 0.022989 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.022989 0.0 0.000000 0.0000 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.011494 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.000000 0.011494 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.000 0.000000 0.0 0.000000 0.0 0.0 0.022989 0.0 0.0 0.0 0.0 0.0 0.0 0.103448 0.022989 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.011494 0.000000 0.000000 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.022989 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.034483 0.0 0.0 0.00000 0.0 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.011494 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.011494 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.011494 0.0 0.000000 0.0 0.0

The most common categories for each neighborhood

In [65]:
def return_most_common_venues(row, num_top_cat):
    row_categories = row.iloc[1:]
    row_categories_sorted = row_categories.sort_values(ascending=False)
    
    return row_categories_sorted.index.values[0:num_top_cat]


num_top_cat = 7
indicators = ['st', 'nd', 'rd']
In [66]:
# create columns according to number of top venues
# columns = ['Neighborhood_']
columns = ['Neighborhood']
for ind in np.arange(num_top_cat):
    try:
        columns.append('{}{} Most Common Category'.format(ind+1, indicators[ind]))
    except:
        columns.append('{}th Most Common Category'.format(ind+1))

# create a new dataframe
tor_neighborhoods_categories_sorted = pd.DataFrame(columns=columns)
# tor_neighborhoods_categories_sorted['Neighborhood_'] = tor_grouped['Neighborhood_']
tor_neighborhoods_categories_sorted['Neighborhood'] = tor_grouped['Neighborhood']

for ind in np.arange(tor_grouped.shape[0]):
    tor_neighborhoods_categories_sorted.iloc[ind, 1:] = return_most_common_venues(
        tor_grouped.iloc[ind, :], num_top_cat)

tor_neighborhoods_categories_sorted.head()
Out[66]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
0 Agincourt Automotive Shop Coffee Shop Church Storage Facility Post Office Furniture / Home Store Chinese Restaurant
1 Alderwood, Long Branch Conference Room Daycare Spa Salon / Barbershop Medical Center Gas Station Dentist's Office
2 Bathurst Manor, Wilson Heights, Downsview North Doctor's Office Residential Building (Apartment / Condo) Medical Center Synagogue Bank Laundry Service Ice Cream Shop
3 Bayview Village Salon / Barbershop Doctor's Office Church Dog Run Bank Grocery Store Café
4 Bedford Park, Lawrence Manor East Salon / Barbershop Italian Restaurant Sushi Restaurant Medical Center Coffee Shop Nail Salon Boutique

2.3 Clustering

Now we apply K-means clustering on the dataframe stored in toronto_grouped variable which includes the relative frequency of each venue-category for each neighborhood.

In [67]:
# set number of clusters
kclusters = 5

# tor_grouped_clustering = tor_grouped.drop('Neighborhood_', 1)
tor_grouped_clustering = tor_grouped.drop('Neighborhood', 1)

# run k-means clustering
kmeans = KMeans(n_clusters=kclusters, random_state=0).fit(tor_grouped_clustering)

# check cluster labels generated for each row in the dataframe
kmeans.labels_[0:10] 
Out[67]:
array([1, 2, 0, 0, 2, 2, 0, 4, 2, 3], dtype=int32)
In [68]:
# add clustering labels
tor_neighborhoods_categories_sorted.insert(0, 'Cluster Labels', kmeans.labels_)

# tor_merged = tor_neighborhoods.rename(columns={'Neighborhood': 'Neighborhood_'}).copy()
# tor_merged = tor_merged[~tor_merged['Neighborhood_'].isin(tor_excluded_neighborhoods)]
tor_merged = tor_neighborhoods.rename(columns={'Neighborhood': 'Neighborhood'}).copy()
tor_merged = tor_merged[~tor_merged['Neighborhood'].isin(tor_excluded_neighborhoods)]

# # merge toronto_grouped with toronto_data to add latitude/longitude for each neighborhood
# tor_merged = tor_merged.join(tor_neighborhoods_categories_sorted.set_index('Neighborhood_'), on='Neighborhood_')
tor_merged = tor_merged.join(tor_neighborhoods_categories_sorted.set_index('Neighborhood'), on='Neighborhood')

tor_merged.head() # check the last columns!
Out[68]:
PostalCode Borough Neighborhood Latitude Longitude Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
0 M1B Scarborough Malvern, Rouge 43.806686 -79.194353 1 Automotive Shop Factory Salon / Barbershop Dentist's Office Coffee Shop Sandwich Place Fried Chicken Joint
1 M1C Scarborough Rouge Hill, Port Union, Highland Creek 43.784535 -79.160497 1 Automotive Shop Medical Center Salon / Barbershop General Entertainment Bar Arts & Crafts Store Chinese Restaurant
2 M1E Scarborough Guildwood, Morningside, West Hill 43.763573 -79.188711 0 Residential Building (Apartment / Condo) Electronics Store Church Restaurant Automotive Shop Salon / Barbershop Tech Startup
3 M1G Scarborough Woburn 43.770992 -79.216917 0 Cosmetics Shop Indian Restaurant Residential Building (Apartment / Condo) Pizza Place Salon / Barbershop Pharmacy Convenience Store
4 M1H Scarborough Cedarbrae 43.773136 -79.239476 2 Doctor's Office Bakery Medical Center Laundry Service Caribbean Restaurant Automotive Shop Skating Rink

Creating a map that shows the neighborhoods and their clusters

We will create a map that shows a marker for each neighborhood; the color of the marker represents the cluster of the neighborhood.

In [69]:
# create map
map_clusters = folium.Map(location=[latitude, longitude], zoom_start=9,
                          min_zoom=8, max_zoom=10)

# set color scheme for the clusters
rainbow = pc[:5]

# add markers to the map
# for lat, lon, poi, cluster in zip(tor_merged['Latitude'], tor_merged['Longitude'], 
#                                   tor_merged['Neighborhood_'], tor_merged['Cluster Labels']):
for lat, lon, poi, cluster in zip(tor_merged['Latitude'], tor_merged['Longitude'], 
                                  tor_merged['Neighborhood'], tor_merged['Cluster Labels']):
    label = folium.Popup(str(poi) + ' Cluster ' + str(cluster), parse_html=True)
    folium.CircleMarker(
        [lat, lon],
        radius=3,
        weight=1,
        popup=label,
        color='#333333',
        fill=True,
        fill_color=rainbow[cluster-1],
        fill_opacity=0.9).add_to(map_clusters)
       
map_clusters
Out[69]:
Make this Notebook Trusted to load map: File -> Trust Notebook

Examining clusters

Let's see the neighborhoods in each of the five clusters:

In [70]:
tor_merged.loc[tor_merged['Cluster Labels'] == 0, 
               tor_merged.columns[[1] + list(range(5, tor_merged.shape[1]))]]
Out[70]:
Borough Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
2 Scarborough 0 Residential Building (Apartment / Condo) Electronics Store Church Restaurant Automotive Shop Salon / Barbershop Tech Startup
3 Scarborough 0 Cosmetics Shop Indian Restaurant Residential Building (Apartment / Condo) Pizza Place Salon / Barbershop Pharmacy Convenience Store
5 Scarborough 0 Automotive Shop Residential Building (Apartment / Condo) Pizza Place Convenience Store Gas Station Church Salon / Barbershop
6 Scarborough 0 Parking Doctor's Office Residential Building (Apartment / Condo) Coffee Shop Discount Store Church Salon / Barbershop
7 Scarborough 0 Parking Park Residential Building (Apartment / Condo) Bakery Diner Automotive Shop Gym
8 Scarborough 0 Pizza Place Salon / Barbershop Convenience Store Laundry Service Church Dentist's Office Restaurant
9 Scarborough 0 General Entertainment Church Indian Restaurant Gas Station Pizza Place Student Center Gym
13 Scarborough 0 Doctor's Office Dentist's Office Automotive Shop Bank Gas Station Fast Food Restaurant Lawyer
15 Scarborough 0 Doctor's Office Bank Dentist's Office Chinese Restaurant Fast Food Restaurant Mobile Phone Shop Electronics Store
19 North York 0 Salon / Barbershop Doctor's Office Church Dog Run Bank Grocery Store Café
21 North York 0 Church Bank Medical Center Salon / Barbershop Park Korean Restaurant Medical Lab
22 North York 0 Residential Building (Apartment / Condo) Bank Salon / Barbershop Bubble Tea Shop Restaurant Coffee Shop Park
28 North York 0 Doctor's Office Residential Building (Apartment / Condo) Medical Center Synagogue Bank Laundry Service Ice Cream Shop
30 North York 0 Residential Building (Apartment / Condo) Vietnamese Restaurant Bank Park Salon / Barbershop Coffee Shop Medical Center
31 North York 0 Residential Building (Apartment / Condo) Vietnamese Restaurant Bank Park Salon / Barbershop Coffee Shop Medical Center
32 North York 0 Residential Building (Apartment / Condo) Vietnamese Restaurant Bank Park Salon / Barbershop Coffee Shop Medical Center
33 North York 0 Residential Building (Apartment / Condo) Vietnamese Restaurant Bank Park Salon / Barbershop Coffee Shop Medical Center
35 East York 0 Bank Café Convenience Store Intersection Coffee Shop Taxi Laundry Service
36 East York 0 Church Park Intersection Automotive Shop Salon / Barbershop Fire Station Laundry Service
39 East York 0 Church Fast Food Restaurant Bank Indian Restaurant Residential Building (Apartment / Condo) Grocery Store Fried Chicken Joint
40 East York 0 Convenience Store Park Intersection Bookstore Church High School Coffee Shop
42 East Toronto 0 Park Convenience Store Salon / Barbershop Pet Store Light Rail Station Board Shop Laundry Service
74 York 0 Salon / Barbershop Bakery Convenience Store Church Residential Building (Apartment / Condo) Park Laundry Service
76 West Toronto 0 Automotive Shop Park Church Furniture / Home Store Portuguese Restaurant Speakeasy Grocery Store
79 North York 0 Residential Building (Apartment / Condo) Salon / Barbershop Garden Elementary School Coffee Shop Gas Station Pharmacy
80 York 0 Residential Building (Apartment / Condo) Convenience Store Bank Hospital Courthouse Fried Chicken Joint Fast Food Restaurant
82 West Toronto 0 Church Government Building Hookah Bar College Classroom General College & University Gas Station Library
93 Etobicoke 0 Residential Building (Apartment / Condo) Park Pharmacy Factory Candy Store Playground Bank
94 Etobicoke 0 Residential Building (Apartment / Condo) School Park Daycare Church Gym Clothing Store
95 Etobicoke 0 Salon / Barbershop Church Dentist's Office Park Bank Electronics Store Doctor's Office
97 North York 0 Factory Furniture / Home Store Hardware Store Residential Building (Apartment / Condo) Coffee Shop Church Department Store
98 York 0 Pizza Place Salon / Barbershop Church Residential Building (Apartment / Condo) Park Doctor's Office Bank
99 Etobicoke 0 Park Mobile Phone Shop Gas Station Caribbean Restaurant Bank Dentist's Office Spa
100 Etobicoke 0 Residential Building (Apartment / Condo) Gym Salon / Barbershop Elementary School Medical Center Park Pizza Place
In [71]:
tor_merged.loc[tor_merged['Cluster Labels'] == 1, 
               tor_merged.columns[[1] + list(range(5, tor_merged.shape[1]))]]
Out[71]:
Borough Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
0 Scarborough 1 Automotive Shop Factory Salon / Barbershop Dentist's Office Coffee Shop Sandwich Place Fried Chicken Joint
1 Scarborough 1 Automotive Shop Medical Center Salon / Barbershop General Entertainment Bar Arts & Crafts Store Chinese Restaurant
10 Scarborough 1 Automotive Shop Furniture / Home Store Auto Garage Miscellaneous Shop Storage Facility Hardware Store Indian Restaurant
12 Scarborough 1 Automotive Shop Coffee Shop Church Storage Facility Post Office Furniture / Home Store Chinese Restaurant
53 Downtown Toronto 1 Automotive Shop Furniture / Home Store Italian Restaurant Art Gallery Coffee Shop Rental Car Location Light Rail Station
81 York 1 Automotive Shop Furniture / Home Store Bank Gas Station Event Space Vietnamese Restaurant Financial or Legal Service
96 North York 1 Automotive Shop Gas Station Bank Furniture / Home Store Rental Car Location Church Storage Facility
102 Etobicoke 1 Factory Automotive Shop Hotel Auto Dealership Professional & Other Places General Entertainment Rental Car Location
In [72]:
tor_merged.loc[tor_merged['Cluster Labels'] == 2, 
               tor_merged.columns[[1] + list(range(5, tor_merged.shape[1]))]]
Out[72]:
Borough Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
4 Scarborough 2 Doctor's Office Bakery Medical Center Laundry Service Caribbean Restaurant Automotive Shop Skating Rink
11 Scarborough 2 Middle Eastern Restaurant Grocery Store Medical Center Intersection Coffee Shop Pizza Place Hookah Bar
14 Scarborough 2 Chinese Restaurant School BBQ Joint Doctor's Office Medical Center Pharmacy Bookstore
16 Scarborough 2 Zoo Exhibit Cosmetics Shop Playground Farm Pizza Place Golf Course Ski Area
17 North York 2 School Medical Center Bank Mobile Phone Shop Assisted Living Pool Housing Development
18 North York 2 Clothing Store Shoe Store Women's Store Doctor's Office Optical Shop Cosmetics Shop Jewelry Store
26 North York 2 Medical Center Automotive Shop Church Coworking Space General College & University Doctor's Office General Entertainment
27 North York 2 Medical Center Automotive Shop Church Coworking Space General College & University Doctor's Office General Entertainment
29 North York 2 Automotive Shop Furniture / Home Store Medical Center Gas Station Doctor's Office Pharmacy Bank
37 East Toronto 2 School Doctor's Office Laundry Service Jewelry Store Playground Salon / Barbershop Bakery
38 East York 2 Bank Sporting Goods Shop Automotive Shop Furniture / Home Store Coffee Shop Sandwich Place Electronics Store
41 East Toronto 2 Greek Restaurant Salon / Barbershop Spa Miscellaneous Shop Women's Store Health Food Store Gym / Fitness Center
43 East Toronto 2 Automotive Shop Nail Salon Moving Target Pharmacy Coffee Shop Furniture / Home Store Spa
44 Central Toronto 2 College Classroom College Auditorium School Park High School Winery Parking
46 Central Toronto 2 Clothing Store Shoe Store Health & Beauty Service Cosmetics Shop Men's Store Furniture / Home Store Toy / Game Store
47 Central Toronto 2 Coffee Shop Salon / Barbershop Nail Salon Italian Restaurant Café Flower Shop Bookstore
48 Central Toronto 2 Park Other Great Outdoors Taxi Bridge Gym Tennis Court Martial Arts School
51 Downtown Toronto 2 Coffee Shop Flower Shop Street Art Pizza Place Café Restaurant Pharmacy
54 Downtown Toronto 2 College Lab University College Communications Building General College & University Taxi College Administrative Building College Academic Building
55 Downtown Toronto 2 Residential Building (Apartment / Condo) Event Space Church Coffee Shop Spa Japanese Restaurant Furniture / Home Store
56 Downtown Toronto 2 Laundry Service Residential Building (Apartment / Condo) Parking Pub Food Truck Hotel Korean Restaurant
57 Downtown Toronto 2 Hospital Coffee Shop Hospital Ward Medical Center Emergency Room Pharmacy Café
58 Downtown Toronto 2 Coffee Shop Vegetarian / Vegan Restaurant Café Food Court Ballroom Hotel Bar Hotel
60 Downtown Toronto 2 Coffee Shop Café Restaurant Park Tech Startup Cosmetics Shop Cocktail Bar
61 Downtown Toronto 2 Financial or Legal Service Coffee Shop Salon / Barbershop Dentist's Office Bank Bagel Shop Food Court
62 North York 2 Salon / Barbershop Italian Restaurant Sushi Restaurant Medical Center Coffee Shop Nail Salon Boutique
63 Central Toronto 2 Dentist's Office Playground Gym Doctor's Office Medical Center Spa Italian Restaurant
64 Central Toronto 2 Dentist's Office Doctor's Office Park Gym / Fitness Center Medical Center General Entertainment Jewelry Store
66 Downtown Toronto 2 College Residence Hall Student Center Food Truck College Classroom College Library College Academic Building College Lab
67 Downtown Toronto 2 Salon / Barbershop Thrift / Vintage Store Boutique Art Gallery Vietnamese Restaurant Clothing Store Bar
70 Downtown Toronto 2 Coffee Shop Bakery Salon / Barbershop Dentist's Office Health & Beauty Service Cosmetics Shop Clothing Store
71 North York 2 Clothing Store Furniture / Home Store Design Studio Accessories Store Women's Store Miscellaneous Shop Hot Dog Joint
72 North York 2 Convenience Store Salon / Barbershop Nail Salon Grocery Store Park Metro Station Café
73 York 2 School Playground Restaurant Indian Restaurant Convenience Store Gas Station Spa
75 Downtown Toronto 2 Café Design Studio Grocery Store Laundry Service Furniture / Home Store Automotive Shop Bakery
77 West Toronto 2 Art Gallery Bar Coffee Shop Furniture / Home Store Salon / Barbershop Boutique Bike Shop
83 West Toronto 2 Breakfast Spot Spa Coffee Shop Church Boutique Art Gallery Furniture / Home Store
84 West Toronto 2 Medical Center Dentist's Office Salon / Barbershop Sushi Restaurant Furniture / Home Store Optical Shop Massage Studio
85 Downtown Toronto 2 Government Building Medical Center Restaurant Capitol Building College Library Medical Lab Doctor's Office
86 Mississauga 2 Hotel Convenience Store Gym Gas Station Breakfast Spot Chinese Restaurant Restaurant
87 East Toronto 2 Light Rail Station Convenience Store Butcher Antique Shop Medical Center Athletics & Sports Theater
88 Etobicoke 2 Pizza Place Coworking Space Fast Food Restaurant Sports Bar Medical Center Athletics & Sports Salon / Barbershop
89 Etobicoke 2 Conference Room Daycare Spa Salon / Barbershop Medical Center Gas Station Dentist's Office
90 Etobicoke 2 Salon / Barbershop Miscellaneous Shop Bank Nail Salon Doctor's Office Spa Medical Center
92 Etobicoke 2 Coworking Space Automotive Shop Fast Food Restaurant Gym / Fitness Center Miscellaneous Shop Thrift / Vintage Store Furniture / Home Store
101 Etobicoke 2 Salon / Barbershop Spiritual Center Movie Theater Farm Art Gallery Church Clothing Store
In [73]:
tor_merged.loc[tor_merged['Cluster Labels'] == 3, 
               tor_merged.columns[[1] + list(range(5, tor_merged.shape[1]))]]
Out[73]:
Borough Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
68 Downtown Toronto 3 Plane Airport Gate Airport Service Moving Target Airport Terminal Airport Lounge Harbor / Marina
In [74]:
tor_merged.loc[tor_merged['Cluster Labels'] == 4, 
               tor_merged.columns[[1] + list(range(5, tor_merged.shape[1]))]]
Out[74]:
Borough Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
20 North York 4 Residential Building (Apartment / Condo) Park Church High School Pool Synagogue School
23 North York 4 Residential Building (Apartment / Condo) Gym Park Medical Center Church Dentist's Office Laundry Service
24 North York 4 Residential Building (Apartment / Condo) Park Medical Center Bank Synagogue Doctor's Office Cemetery
25 North York 4 Residential Building (Apartment / Condo) Park Elementary School School Sandwich Place Convenience Store Other Great Outdoors
34 North York 4 Residential Building (Apartment / Condo) Automotive Shop Auto Dealership Dentist's Office Government Building Event Space Bank
45 Central Toronto 4 Residential Building (Apartment / Condo) Dog Run Gym Dentist's Office Hotel Medical Center Scenic Lookout
49 Central Toronto 4 Residential Building (Apartment / Condo) Doctor's Office Dentist's Office Medical Center Light Rail Station Taxi Spiritual Center
50 Downtown Toronto 4 Residential Building (Apartment / Condo) Park Bank Bridge Other Great Outdoors General Travel Trail
52 Downtown Toronto 4 Residential Building (Apartment / Condo) Doctor's Office Gym / Fitness Center Gym Spa Smoke Shop Taxi
59 Downtown Toronto 4 Residential Building (Apartment / Condo) Coffee Shop Fried Chicken Joint Parking Light Rail Station Taxi Doctor's Office
65 Central Toronto 4 Residential Building (Apartment / Condo) Bed & Breakfast Medical Center General Entertainment Sandwich Place Gym Hotel
69 Downtown Toronto 4 Residential Building (Apartment / Condo) Tech Startup Bar Hotel Gym Pub Restaurant
78 West Toronto 4 Residential Building (Apartment / Condo) Tech Startup Conference Room Coworking Space Advertising Agency Convenience Store Coffee Shop
91 Etobicoke 4 Residential Building (Apartment / Condo) Convenience Store Park Elementary School School Playground Grocery Store

Top 10 Common Venue Categories in NYC

In [75]:
fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)

nyc_top_vc = nyc_venues['Venue Category'].value_counts(normalize=False)

ax = nyc_top_vc.head(10).plot(kind='barh', color=pc[0]);
ax.invert_yaxis()
plot_conf(ax, xlbl='Number of venues', ylbl='Venue category', t='')
plt.tight_layout()
fig.savefig('most-common-ven-nyc.png', dpi=300)

Top 10 Common Venue Categories in Toronto

In [76]:
fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)

tor_top_vc = tor_venues['Venue Category'].value_counts(normalize=False)

ax = tor_top_vc.head(10).plot(kind='barh', color=pc[3]);
ax.invert_yaxis()
plot_conf(ax, xlbl='Number of venues', ylbl='Venue category', t='')
plt.tight_layout()
fig.savefig('most-common-ven-tor.png', dpi=300)

Top 10 Venue Categories that Exist in Most NYC Neighborhoods

In [77]:
fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)

nyc_g = nyc_onehot.groupby('Neighborhood').max().reset_index()
nyc_p = nyc_g.drop('Neighborhood', axis=1).sum().sort_values(ascending=False)

print("{} neighborhoods in NYC".format(nyc_g.shape[0]))

ax = nyc_p.head(10).plot(kind='barh', color=pc[8]);
ax.invert_yaxis()
plot_conf(ax, xlbl='Number of neighborhoods', ylbl='Venue category', t='')
plt.tight_layout()
fig.savefig('most-common2-ven-nyc.png', dpi=300)
306 neighborhoods in NYC

Top 10 Venue Categories that Exist in Most Toronto Neighborhoods

In [78]:
fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)

tor_g = tor_onehot.groupby('Neighborhood').max().reset_index()
tor_p = tor_g.drop('Neighborhood', axis=1).sum().sort_values(ascending=False)

print("{} neighborhoods in Toronto".format(tor_g.shape[0]))
ax = tor_p.head(10).plot(kind='barh', color=pc[14]);
ax.invert_yaxis()
plot_conf(ax, xlbl='Number of neighborhoods', ylbl='Venue category', t='')
plt.tight_layout()
fig.savefig('most-common2-ven-tor.png', dpi=300)
99 neighborhoods in Toronto

Rare Venue Categories in NYC

In [79]:
nyc_bot_vc = nyc_venues['Venue Category'].value_counts(normalize=False)
nyc_bot_vc = nyc_bot_vc.tail(10).to_frame('Count')
nyc_bot_vc.index.names = ['Venue Category']
nyc_bot_vc
Out[79]:
Count
Venue Category
Colombian Restaurant 1
Light Rail Station 1
Line / Queue 1
Hunan Restaurant 1
Costume Shop 1
Roller Rink 1
Cable Car 1
Caucasian Restaurant 1
Forest 1
Adult Boutique 1

Rare Venue Categories in Toronto

In [80]:
tor_bot_vc = tor_venues['Venue Category'].value_counts(normalize=False)
tor_bot_vc = tor_bot_vc.tail(10).to_frame('Count')
tor_bot_vc.index.names = ['Venue Category']
tor_bot_vc
Out[80]:
Count
Venue Category
Cable Car 1
Language School 1
Roof Deck 1
Baggage Claim 1
Carpet Store 1
Ski Chalet 1
Pastry Shop 1
College Math Building 1
Stables 1
Buffet 1
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 

Combining NYC and Toronto data

In [81]:
clmns_nyc_only = set(nyc_grouped.columns).difference(set(tor_grouped.columns))
clmns_tor_only = set(tor_grouped.columns).difference(set(nyc_grouped.columns))
In [82]:
nyc_grouped_ = nyc_grouped.copy()
nyc_grouped_['Neighborhood'] = nyc_grouped_['Neighborhood'].apply(lambda x: x + '_NYC')

tor_grouped_ = tor_grouped.copy()
tor_grouped_['Neighborhood'] = tor_grouped_['Neighborhood'].apply(lambda x: x + '_Toronto')

for c in clmns_tor_only:
    nyc_grouped_[c] = 0
for c in clmns_nyc_only:
    tor_grouped_[c] = 0
    
all_clmns_sorted = ['Neighborhood'] + sorted(list(nyc_grouped_.drop('Neighborhood', axis=1).columns), 
                                              key=str.lower)
nyc_grouped_ = nyc_grouped_[all_clmns_sorted]
tor_grouped_ = tor_grouped_[all_clmns_sorted]
    
nyc_tor_grouped = pd.concat([nyc_grouped_, tor_grouped_]).reset_index(drop=True)
In [83]:
nyc_tor_grouped.loc[303:308,]
Out[83]:
Neighborhood Accessories Store Acupuncturist Adult Boutique Advertising Agency Afghan Restaurant African Restaurant Airport Airport Food Court Airport Gate Airport Lounge Airport Service Airport Terminal Airport Tram Alternative Healer American Restaurant Animal Shelter Antique Shop Aquarium Arcade Arepa Restaurant Argentinian Restaurant Art Gallery Art Museum Art Studio Arts & Crafts Store Arts & Entertainment Asian Restaurant Assisted Living Astrologer Athletics & Sports ATM Auditorium Australian Restaurant Auto Dealership Auto Garage Auto Workshop Automotive Shop Baby Store Badminton Court Bagel Shop Baggage Claim Baggage Locker Bakery Ballroom Bank Bar Baseball Field Baseball Stadium Basketball Court Bath House Bathing Area BBQ Joint Beach Beach Bar Bed & Breakfast Beer Bar Beer Garden Beer Store Belgian Restaurant Big Box Store Bike Rental / Bike Share Bike Shop Bike Trail Bistro Blood Donation Center Board Shop Boat or Ferry Bookstore Border Crossing Botanical Garden Boutique Bowling Alley Boxing Gym Brazilian Restaurant Breakfast Spot Brewery Bridal Shop Bridge Bubble Tea Shop Buddhist Temple Buffet Burger Joint Burmese Restaurant Burrito Place Business Center Business Service Butcher Cable Car Cafeteria Café Cajun / Creole Restaurant Cambodian Restaurant Camera Store Campaign Office Campground Canal Candy Store Cantonese Restaurant Capitol Building Car Wash Caribbean Restaurant Carpet Store Casino Caucasian Restaurant Cemetery Cha Chaan Teng Check Cashing Service Cheese Shop Child Care Service Chinese Breakfast Place Chinese Restaurant Chiropractor Chocolate Shop Church Circus City Hall Climbing Gym Clothing Store Club House Cocktail Bar Coffee Shop College & University College Academic Building College Administrative Building College Arts Building College Auditorium College Basketball Court College Bookstore College Cafeteria College Classroom College Communications Building College Engineering Building College Football Field College Gym College History Building College Hockey Rink College Lab College Library College Math Building College Quad College Rec Center College Residence Hall College Science Building College Soccer Field College Stadium College Technology Building College Theater College Track Colombian Restaurant Comedy Club Comfort Food Restaurant Comic Shop Community Center Community College Concert Hall Conference Room Construction & Landscaping Convenience Store Convention Center Cooking School Corporate Amenity Corporate Cafeteria Cosmetics Shop Costume Shop Country Dance Club Courthouse Coworking Space Credit Union Creperie Cuban Restaurant Cultural Center Cupcake Shop Currency Exchange Cycle Studio Dance Studio Daycare Deli / Bodega Dentist's Office Department Store Design Studio Dessert Shop Dim Sum Restaurant Diner Discount Store Distillery Distribution Center Dive Bar Doctor's Office Dog Run Donut Shop Dosa Place Driving School Drugstore Dry Cleaner Dumpling Restaurant Eastern European Restaurant Electronics Store Elementary School Embassy / Consulate Emergency Room Empanada Restaurant English Restaurant Entertainment Service Escape Room Ethiopian Restaurant EV Charging Station Event Service Event Space Exhibit Eye Doctor Fabric Shop Factory Fair Falafel Restaurant Farm Farmers Market Fast Food Restaurant Field Filipino Restaurant Film Studio Financial or Legal Service Fire Station Fireworks Store Fish & Chips Shop Fish Market Fishing Spot Fishing Store Flea Market Flight School Floating Market Flower Shop Food Food & Drink Shop Food Court Food Service Food Stand Food Truck Forest Frame Store Fraternity House French Restaurant Fried Chicken Joint Frozen Yogurt Shop Fruit & Vegetable Store Funeral Home Furniture / Home Store Gaming Cafe Garden Garden Center Gas Station Gastropub Gay Bar General College & University General Entertainment General Travel German Restaurant Gift Shop Gluten-free Restaurant Golf Course Golf Driving Range Gourmet Shop Government Building Greek Restaurant Grocery Store Gun Range Gym Gym / Fitness Center Gym Pool Gymnastics Gym Hakka Restaurant Halal Restaurant Harbor / Marina Hardware Store Hawaiian Restaurant Health & Beauty Service Health Food Store Herbs & Spices Store High School Himalayan Restaurant Hindu Temple Historic Site History Museum Hobby Shop Hockey Arena Home Service Hookah Bar Hospital Hospital Ward Hostel Hot Dog Joint Hot Spring Hotel Hotel Bar Hotpot Restaurant Housing Development Hunan Restaurant Hungarian Restaurant Ice Cream Shop Indian Restaurant Indie Movie Theater Indie Theater Indoor Play Area Industrial Estate Insurance Office Internet Cafe Intersection Irish Pub Island Israeli Restaurant IT Services Italian Restaurant Japanese Curry Restaurant Japanese Restaurant Jazz Club Jewelry Store Jewish Restaurant Juice Bar Karaoke Bar Kebab Restaurant Kids Store Kingdom Hall Kitchen Supply Store Korean BBQ Restaurant Korean Restaurant Kosher Restaurant Lake Language School Latin American Restaurant Laundromat Laundry Service Law School Lawyer Leather Goods Store Lebanese Restaurant Library Light Rail Station Lighthouse Lighting Store Line / Queue Lingerie Store Liquor Store Locksmith Lottery Retailer Lounge Luggage Store Mac & Cheese Joint Malay Restaurant Marijuana Dispensary Market Martial Arts School Massage Studio Maternity Clinic Mattress Store Medical Center Medical Lab Medical School Medical Supply Store Mediterranean Restaurant Meeting Room Memorial Site Men's Store Mental Health Office Metro Station Mexican Restaurant Middle Eastern Restaurant Middle School Military Base Mini Golf Miscellaneous Shop Mobile Phone Shop Mobility Store Modern European Restaurant Monastery Monument / Landmark Moroccan Restaurant Mosque Motel Motorcycle Shop Mountain Movie Theater Moving Target Multiplex Museum Music School Music Store Music Venue Nail Salon National Park New American Restaurant Newsagent Newsstand Night Market Nightclub Nightlife Spot Non-Profit Noodle House North Indian Restaurant Nursery School Opera House Optical Shop Organic Grocery Other Event Other Great Outdoors Other Nightlife Other Repair Shop Outdoor Event Space Outdoor Gym Outdoor Sculpture Outdoor Supply Store Outdoors & Recreation Outlet Mall Outlet Store Paella Restaurant Paintball Field Pakistani Restaurant Paper / Office Supplies Store Park Parking Pastry Shop Pawn Shop Pedestrian Plaza Peking Duck Restaurant Performing Arts Venue Perfume Shop Persian Restaurant Peruvian Restaurant Pet Café Pet Service Pet Store Pharmacy Photography Lab Photography Studio Physical Therapist Piano Bar Pie Shop Pier Piercing Parlor Pilates Studio Pizza Place Plane Platform Playground Plaza Poke Place Police Station Polish Restaurant Pool Pool Hall Pop-Up Shop Portuguese Restaurant Post Office Poutine Place Power Plant Prayer Room Preschool Print Shop Private School Professional & Other Places Pub Public Art Public Bathroom Puerto Rican Restaurant Racetrack Radio Station Ramen Restaurant Real Estate Office Record Shop Recording Studio Recreation Center Recruiting Agency Recycling Facility Rehab Center Religious School Rental Car Location Rental Service Research Laboratory Residence Residential Building (Apartment / Condo) Resort Rest Area Restaurant River Rock Climbing Spot Rock Club Roller Rink Roof Deck Rugby Pitch Russian Restaurant Sake Bar Salad Place Salon / Barbershop Salsa Club Sandwich Place Sausage Shop Scenic Lookout School Sculpture Garden Seafood Restaurant Shabu-Shabu Restaurant Shanghai Restaurant Shawarma Place Shipping Store Shoe Repair Shoe Store Shop & Service Shopping Mall Shopping Plaza Shrine Sikh Temple Skate Park Skating Rink Ski Area Ski Chalet Ski Lodge Smoke Shop Smoothie Shop Snack Place Soccer Field Social Club Sorority House Soup Place South American Restaurant South Indian Restaurant Southern / Soul Food Restaurant Souvenir Shop Souvlaki Shop Spa Spanish Restaurant Speakeasy Spiritual Center Sporting Goods Shop Sports Bar Sports Club Squash Court Sri Lankan Restaurant Stables Stadium State / Provincial Park Stationery Store Steakhouse Stoop Sale Storage Facility Street Art Strip Club Student Center Summer Camp Supermarket Supplement Shop Surf Spot Sushi Restaurant Swim School Swiss Restaurant Synagogue Szechuan Restaurant Taco Place Tailor Shop Taiwanese Restaurant Tanning Salon Tapas Restaurant Tattoo Parlor Taxi Taxi Stand Tea Room Tech Startup Temple Tennis Court Tennis Stadium Tex-Mex Restaurant Thai Restaurant Theater Theme Park Theme Park Ride / Attraction Theme Restaurant Thrift / Vintage Store Tibetan Restaurant Tiki Bar Toll Booth Toll Plaza Tour Provider Tourist Information Center Toy / Game Store Track Track Stadium Trade School Trail Trailer Park Train Train Station Tram Station Transportation Service Travel & Transport Travel Agency Travel Lounge Tree Tunnel Turkish Restaurant TV Station University Urgent Care Center Vacation Rental Vape Store Varenyky restaurant Vegetarian / Vegan Restaurant Veterinarian Video Game Store Video Store Vietnamese Restaurant Vineyard Volleyball Court Voting Booth Warehouse Warehouse Store Waste Facility Watch Shop Water Park Waterfront Wedding Hall Weight Loss Center Well Whisky Bar Wine Bar Wine Shop Winery Wings Joint Women's Store Yemeni Restaurant Yoga Studio Zoo Zoo Exhibit
303 Woodrow_NYC 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0000 0.0 0.0 0.012500 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.012500 0.00000 0.000000 0.0 0.000000 0.000 0.0000 0.012500 0.0 0.0000 0.012500 0.0 0.0 0.012500 0.0 0.012500 0.025000 0.0 0.0 0.0125 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.012500 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.000000 0.0 0.025000 0.0 0.0 0.0 0.0000 0.0 0.025 0.012500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.025000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.025000 0.0 0.000000 0.0 0.0 0.012500 0.0 0.0 0.0 0.0 0.012500 0.0125 0.0125 0.0 0.00000 0.0 0.000000 0.000000 0.0 0.0125 0.0 0.0125 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000 0.0 0.0 0.0 0.0125 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.025 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.01250 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.00000 0.0 0.000000 0.0 0.0 0.0 0.012500 0.0 0.0125 0.0125 0.000000 0.01250 0.0 0.025000 0.0 0.0 0.0 0.0 0.000000 0.0 0.037500 0.0 0.012500 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0 0.0125 0.0125 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0125 0.0 0.000000 0.000000 0.00000 0.0 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.012500 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.00000 0.00000 0.000000 0.025000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.025000 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0125 0.0 0.0 0.0000 0.000000 0.0 0.000000 0.0000 0.000000 0.0 0.0 0.0 0.0 0.00000 0.012500 0.000000 0.0125 0.0 0.0 0.025000 0.012500 0.0 0.0 0.0 0.000000 0.0 0.00000 0.0 0.0000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0000 0.00000 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.025000 0.0 0.0 0.025 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.050000 0.0 0.0 0.0 0.01250 0.0 0.0 0.0 0.0 0.0000 0.0 0.012500 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000 0.000000 0.0 0.0 0.000000 0.0 0.0 0.012500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.025000 0.0 0.000000 0.0 0.0 0.037500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0125 0.0 0.0 0.000000 0.0 0.0 0.012500 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0
304 Woodside_NYC 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.01087 0.000000 0.0 0.000000 0.000 0.0000 0.010870 0.0 0.0000 0.000000 0.0 0.0 0.021739 0.0 0.010870 0.065217 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.010870 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.000000 0.0 0.010870 0.0 0.0 0.0 0.0000 0.0 0.000 0.010870 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.01087 0.0 0.0 0.000000 0.000000 0.010870 0.0 0.0 0.0 0.0 0.010870 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.032609 0.021739 0.0 0.000000 0.0 0.0 0.010870 0.0 0.0 0.0 0.0 0.010870 0.0000 0.0000 0.0 0.01087 0.0 0.000000 0.000000 0.0 0.0000 0.0 0.0000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.010870 0.0 0.0 0.0 0.000 0.0 0.0 0.0 0.0000 0.021739 0.0 0.0 0.0 0.01087 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.01087 0.000000 0.0 0.0 0.000000 0.021739 0.0 0.0 0.0 0.0 0.000000 0.000000 0.01087 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0000 0.0000 0.010870 0.01087 0.0 0.000000 0.0 0.0 0.0 0.0 0.010870 0.0 0.021739 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.010870 0.0 0.021739 0.000000 0.0 0.0 0.01087 0.0 0.0 0.0 0.0 0.0 0.0000 0.0000 0.0 0.0 0.0 0.01087 0.0 0.000000 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.01087 0.0 0.0 0.0 0.0 0.01087 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.01087 0.01087 0.010870 0.021739 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.021739 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0000 0.010870 0.0 0.000000 0.0000 0.000000 0.0 0.0 0.0 0.0 0.01087 0.054348 0.000000 0.0000 0.0 0.0 0.032609 0.000000 0.0 0.0 0.0 0.000000 0.0 0.01087 0.0 0.0000 0.01087 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0000 0.01087 0.0 0.010870 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.021739 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.010870 0.0 0.043478 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.01087 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000 0.000000 0.0 0.0 0.021739 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.065217 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.010870 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0000 0.0 0.0 0.010870 0.0 0.0 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.043478 0.0 0.0 0.0 0.0 0.021739 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.01087 0.01087 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0
305 Yorkville_NYC 0.0 0.011364 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.011364 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.00000 0.000000 0.0 0.000000 0.000 0.0000 0.000000 0.0 0.0000 0.011364 0.0 0.0 0.000000 0.0 0.011364 0.022727 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.011364 0.011364 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.011364 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.0 0.0 0.000000 0.011364 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.011364 0.000000 0.0 0.000000 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.000000 0.0000 0.0000 0.0 0.00000 0.0 0.011364 0.011364 0.0 0.0000 0.0 0.0000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.000 0.0 0.0 0.0 0.0000 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.0 0.034091 0.00000 0.022727 0.0 0.0 0.011364 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.00000 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0000 0.0000 0.022727 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.034091 0.011364 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0000 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.00000 0.0 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.00000 0.00000 0.000000 0.056818 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.011364 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0000 0.000000 0.0 0.000000 0.0000 0.011364 0.0 0.0 0.0 0.0 0.00000 0.000000 0.000000 0.0000 0.0 0.0 0.011364 0.000000 0.0 0.0 0.0 0.000000 0.0 0.00000 0.0 0.0000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0000 0.00000 0.0 0.011364 0.011364 0.011364 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.011364 0.0 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.0 0.011364 0.034091 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.022727 0.0 0.000000 0.000000 0.0 0.0 0.011364 0.0 0.011364 0.0 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000 0.000000 0.0 0.0 0.250000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.034091 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.045455 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.011364 0.0 0.0000 0.0 0.0 0.011364 0.0 0.0 0.011364 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.022727 0.0 0.0 0.000000 0.0 0.011364 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.011364 0.0 0.0 0.0 0.0 0.011364 0.0 0.0
306 Agincourt_Toronto 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0125 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.00000 0.000000 0.0 0.025000 0.025 0.0125 0.175000 0.0 0.0125 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.025 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012500 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0250 0.012500 0.0 0.037500 0.0 0.0 0.0 0.0125 0.0 0.000 0.037500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.0 0.0 0.000000 0.000000 0.012500 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012500 0.0000 0.0000 0.0 0.00000 0.0 0.000000 0.000000 0.0 0.0000 0.0 0.0000 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.025000 0.0 0.0 0.0 0.025 0.0 0.0 0.0 0.0000 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.00000 0.0 0.025000 0.0 0.0 0.0 0.025000 0.0 0.0000 0.0000 0.025000 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.012500 0.0 0.012500 0.0 0.012500 0.000000 0.0 0.0 0.0 0.0 0.0 0.025000 0.0 0.000000 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0000 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.00000 0.0 0.0 0.0 0.0 0.00000 0.0 0.012500 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.0 0.00000 0.01250 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0125 0.012500 0.0 0.000000 0.0125 0.000000 0.0 0.0 0.0 0.0 0.00000 0.000000 0.000000 0.0000 0.0 0.0 0.012500 0.000000 0.0 0.0 0.0 0.000000 0.0 0.00000 0.0 0.0125 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0125 0.01250 0.0 0.000000 0.000000 0.012500 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.03750 0.0 0.0 0.0 0.0 0.0125 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.025 0.000000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012500 0.0 0.012500 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0125 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.037500 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.012500 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.01250 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0
307 Alderwood, Long Branch_Toronto 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.012346 0.012346 0.0 0.012346 0.0 0.0 0.012346 0.00000 0.000000 0.0 0.012346 0.000 0.0000 0.012346 0.0 0.0000 0.000000 0.0 0.0 0.000000 0.0 0.037037 0.000000 0.0 0.0 0.0000 0.0 0.0 0.024691 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.012346 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.000000 0.0 0.0 0.0 0.0 0.012346 0.012346 0.0 0.0 0.000 0.0 0.0 0.0 0.024691 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0000 0.0 0.000 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.0 0.0 0.037037 0.000000 0.037037 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.037037 0.012346 0.037037 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.012346 0.0000 0.0000 0.0 0.00000 0.0 0.000000 0.000000 0.0 0.0000 0.0 0.0000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000 0.0 0.0 0.0 0.0000 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.00000 0.0 0.012346 0.0 0.0 0.0 0.037037 0.0 0.0000 0.0000 0.012346 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.012346 0.012346 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.000000 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0000 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0000 0.0 0.012346 0.000000 0.00000 0.0 0.0 0.0 0.0 0.00000 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.00000 0.00000 0.012346 0.012346 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.012346 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0000 0.037037 0.0 0.000000 0.0000 0.000000 0.0 0.0 0.0 0.0 0.00000 0.000000 0.000000 0.0000 0.0 0.0 0.012346 0.000000 0.0 0.0 0.0 0.000000 0.0 0.00000 0.0 0.0000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.012346 0.0000 0.00000 0.0 0.000000 0.000000 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.012346 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.024691 0.0 0.000000 0.012346 0.0 0.0 0.000000 0.0 0.012346 0.0 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.012346 0.024691 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000 0.012346 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.037037 0.0 0.012346 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.012346 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.037037 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.0 0.0 0.000000 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.012346 0.0 0.000000 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.012346 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0
308 Bathurst Manor, Wilson Heights, Downsview Nort... 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.012195 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.00000 0.012195 0.0 0.000000 0.000 0.0000 0.012195 0.0 0.0000 0.000000 0.0 0.0 0.000000 0.0 0.048780 0.012195 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.000000 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.012195 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012195 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.000000 0.0 0.012195 0.0 0.0 0.0 0.0000 0.0 0.000 0.024390 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.0 0.0 0.000000 0.000000 0.024390 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012195 0.012195 0.0 0.000000 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.085366 0.0000 0.0000 0.0 0.00000 0.0 0.000000 0.000000 0.0 0.0000 0.0 0.0000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000 0.0 0.0 0.0 0.0000 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 0.000000 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.012195 0.012195 0.00000 0.0 0.000000 0.0 0.0 0.0 0.012195 0.0 0.0000 0.0000 0.000000 0.00000 0.0 0.012195 0.0 0.0 0.0 0.0 0.012195 0.0 0.012195 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.012195 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0000 0.0 0.0 0.0 0.00000 0.0 0.012195 0.0 0.0 0.0000 0.0 0.000000 0.036585 0.00000 0.0 0.0 0.0 0.0 0.00000 0.0 0.012195 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.00000 0.00000 0.000000 0.036585 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0000 0.0 0.0 0.0000 0.060976 0.0 0.012195 0.0000 0.000000 0.0 0.0 0.0 0.0 0.00000 0.000000 0.012195 0.0000 0.0 0.0 0.012195 0.012195 0.0 0.0 0.0 0.012195 0.0 0.00000 0.0 0.0000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.000000 0.0000 0.00000 0.0 0.000000 0.000000 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.012195 0.012195 0.0 0.0 0.000 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.000000 0.012195 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.00000 0.0 0.0 0.0 0.0 0.0000 0.0 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.000 0.000000 0.0 0.0 0.060976 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.036585 0.0 0.012195 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.000000 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.036585 0.0 0.0 0.0 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.000000 0.0 0.0000 0.0 0.0 0.012195 0.0 0.0 0.012195 0.0 0.0 0.04878 0.0 0.0 0.0 0.0 0.0000 0.0 0.0 0.000000 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00000 0.00000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.012195 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.012195 0.0 0.0
In [84]:
nyc_tor_grouped.shape
Out[84]:
(405, 630)
In [85]:
# obtaining the most popular categories for each neighborhood
nyc_tor_neighborhoods_categories_sorted = pd.DataFrame(columns=columns)
nyc_tor_neighborhoods_categories_sorted['Neighborhood'] = nyc_tor_grouped['Neighborhood']

for ind in np.arange(nyc_tor_grouped.shape[0]):
    nyc_tor_neighborhoods_categories_sorted.iloc[ind, 1:] = return_most_common_venues(
        nyc_tor_grouped.iloc[ind, :], num_top_cat)

nyc_tor_neighborhoods_categories_sorted.head()
Out[85]:
Neighborhood 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
0 Allerton_NYC Salon / Barbershop Laundry Service Food Gas Station Pizza Place Non-Profit Car Wash
1 Annadale_NYC Pizza Place Salon / Barbershop Nail Salon Tattoo Parlor American Restaurant Pet Store Bagel Shop
2 Arden Heights_NYC Professional & Other Places Doctor's Office Church Dentist's Office Bar Gym General Entertainment
3 Arlington_NYC Church Hardware Store Salon / Barbershop Professional & Other Places Residential Building (Apartment / Condo) Automotive Shop American Restaurant
4 Arrochar_NYC Deli / Bodega Pizza Place Food Truck Dry Cleaner Dance Studio Doctor's Office Bar

Top 10 Common Venue Categories in both NYC and Toronto

In [86]:
fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)
nyc_tor_top_vc = pd.concat([nyc_venues, tor_venues])['Venue Category'].value_counts(normalize=True) * 100
ax = nyc_tor_top_vc.head(10).plot(kind='barh', color=pc[12]);
ax.invert_yaxis()
plot_conf(ax, xlbl='Number of venues', ylbl='Venue category', t='')
fig.savefig('most-common-ven-nyc-tor.png', dpi=300)

Rare Categories in both NYC and Toronto

In [87]:
nyc_tor_bot_vc = pd.concat([nyc_venues, tor_venues])['Venue Category'].value_counts(normalize=False)
nyc_tor_bot_vc = nyc_tor_bot_vc.tail(10).to_frame('Count')
nyc_tor_bot_vc.index.names = ['Venue Category']
nyc_tor_bot_vc
Out[87]:
Count
Venue Category
Aquarium 1
Swim School 1
Roller Rink 1
Australian Restaurant 1
Newsagent 1
Airport Food Court 1
Toll Booth 1
Piercing Parlor 1
Stadium 1
Rugby Pitch 1

Clustering

In [88]:
# the number of clusters
kclusters = 5

# nyc_tor_grouped_clustering = nyc_tor_grouped.drop('Neighborhood_', 1)
nyc_tor_grouped_clustering = nyc_tor_grouped.drop('Neighborhood', 1)

# run k-means clustering
kmeans = KMeans(n_clusters=kclusters, random_state=0).fit(nyc_tor_grouped_clustering)

# check cluster labels generated for each row in the dataframe
kmeans.labels_[0:10] 
Out[88]:
array([3, 3, 4, 4, 3, 4, 2, 3, 0, 3], dtype=int32)
In [89]:
# add clustering labels
nyc_tor_neighborhoods_categories_sorted.insert(0, 'Cluster Labels', kmeans.labels_)

# nyc_tor_merged = nyc_tor_neighborhoods.rename(columns={'Neighborhood': 'Neighborhood_'}).copy()
# tor_merged = tor_merged[~tor_merged['Neighborhood_'].isin(tor_excluded_neighborhoods)]

# # merge toronto_grouped with toronto_data to add latitude/longitude for each neighborhood
# nyc_tor_merged = nyc_tor_neighborhoods_categories_sorted.set_index('Neighborhood_')

# merge toronto_grouped with toronto_data to add latitude/longitude for each neighborhood
nyc_tor_merged = nyc_tor_neighborhoods_categories_sorted.set_index('Neighborhood')

nyc_tor_merged.iloc[300:310] # check the last columns!
Out[89]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood
Wingate_NYC 3 Salon / Barbershop School Deli / Bodega Caribbean Restaurant Event Space Food Residential Building (Apartment / Condo)
Woodhaven_NYC 3 Deli / Bodega Salon / Barbershop Laundry Service Miscellaneous Shop Liquor Store Doctor's Office Chinese Restaurant
Woodlawn_NYC 3 Bar Deli / Bodega Salon / Barbershop Pub Church Food & Drink Shop Pizza Place
Woodrow_NYC 4 Pool Grocery Store School Physical Therapist Dentist's Office Salon / Barbershop Bar
Woodside_NYC 3 Bar Salon / Barbershop Mexican Restaurant Thai Restaurant Platform Deli / Bodega Miscellaneous Shop
Yorkville_NYC 2 Residential Building (Apartment / Condo) Laundry Service Spa Pharmacy Flower Shop Gym Salon / Barbershop
Agincourt_Toronto 0 Automotive Shop Storage Facility Post Office Church Coffee Shop Gas Station Business Service
Alderwood, Long Branch_Toronto 4 Convenience Store Salon / Barbershop Spa Dentist's Office Gas Station Daycare Bank
Bathurst Manor, Wilson Heights, Downsview North_Toronto 1 Doctor's Office Residential Building (Apartment / Condo) Medical Center Synagogue Bank Spa Ice Cream Shop
Bayview Village_Toronto 4 Salon / Barbershop Doctor's Office Church Dog Run Bank Grocery Store Japanese Restaurant

Examining clusters

Let's see the neighborhoods in each of the five clusters:

Cluster 1
In [90]:
c1 = nyc_tor_merged.loc[nyc_tor_merged['Cluster Labels'] == 0, :]
print(c1.shape)
c1.iloc[60:70]
(18, 8)
Out[90]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood

Most common categories among all neighborhoods in this cluster:

Cluster 2
In [91]:
c2 = nyc_tor_merged.loc[nyc_tor_merged['Cluster Labels'] == 1, :]
print(c2.shape)
c2
(43, 8)
Out[91]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood
Bloomfield_NYC 1 Doctor's Office Automotive Shop Baseball Field Grocery Store Sporting Goods Shop Other Great Outdoors Cosmetics Shop
Brooklyn Heights_NYC 1 Doctor's Office Residential Building (Apartment / Condo) School Salon / Barbershop Women's Store Church Laundry Service
Bulls Head_NYC 1 Doctor's Office Pizza Place Bank Church Dentist's Office Hospital Salon / Barbershop
Castleton Corners_NYC 1 Doctor's Office Church Medical Center Salon / Barbershop Dentist's Office Deli / Bodega Nail Salon
Concord_NYC 1 Doctor's Office Deli / Bodega Chinese Restaurant Medical Center Martial Arts School Bakery Automotive Shop
Dongan Hills_NYC 1 Deli / Bodega Doctor's Office Salon / Barbershop Church Bar Pet Store Residential Building (Apartment / Condo)
Dyker Heights_NYC 1 Doctor's Office Gas Station Salon / Barbershop Dog Run Automotive Shop Deli / Bodega Event Space
Egbertville_NYC 1 Doctor's Office Salon / Barbershop Park Automotive Shop Dentist's Office Trail Medical Center
Emerson Hill_NYC 1 Doctor's Office Medical Center Residential Building (Apartment / Condo) Church College Library Spa Grocery Store
Forest Hills_NYC 1 Dentist's Office Doctor's Office Residential Building (Apartment / Condo) Convention Center School Library Elementary School
Fort Hamilton_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Pizza Place Deli / Bodega Salon / Barbershop Laundry Service Miscellaneous Shop
Georgetown_NYC 1 Doctor's Office Bank Chinese Restaurant Medical Center Discount Store Salon / Barbershop Laundry Service
Glendale_NYC 1 Doctor's Office Deli / Bodega Chinese Restaurant Salon / Barbershop Church School Dentist's Office
Gramercy_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Medical Center Salon / Barbershop Dentist's Office Laundry Service Ice Cream Shop
Greenridge_NYC 1 Doctor's Office Professional & Other Places Dentist's Office Asian Restaurant Laundry Service Parking Taxi
Heartland Village_NYC 1 Doctor's Office Bagel Shop Chinese Restaurant Professional & Other Places Pizza Place Dentist's Office Salon / Barbershop
Holliswood_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Gas Station Salon / Barbershop Dentist's Office Caribbean Restaurant Event Space
Kew Gardens_NYC 1 Residential Building (Apartment / Condo) Doctor's Office Synagogue Laundry Service Taxi Dentist's Office Other Great Outdoors
Lindenwood_NYC 1 Doctor's Office Dentist's Office Residential Building (Apartment / Condo) Bank Medical Center Deli / Bodega Miscellaneous Shop
Madison_NYC 1 Doctor's Office Synagogue Residential Building (Apartment / Condo) Dentist's Office Eastern European Restaurant Medical Center Food
Manhattan Terrace_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Dentist's Office Housing Development Parking School Medical Center
Morris Park_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Dentist's Office Nail Salon Ice Cream Shop Bank Pizza Place
Murray Hill, Manhattan_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Dentist's Office Hotel Parking Embassy / Consulate Event Space
New Springville_NYC 1 Doctor's Office Deli / Bodega Salon / Barbershop Bagel Shop Mobile Phone Shop Chinese Restaurant Pizza Place
Norwood_NYC 1 Doctor's Office Park Residential Building (Apartment / Condo) Deli / Bodega Medical Center Salon / Barbershop Food Truck
Oakwood_NYC 1 Doctor's Office Dentist's Office Church Medical Center Elementary School Other Nightlife Other Great Outdoors
Ocean Parkway_NYC 1 Residential Building (Apartment / Condo) Doctor's Office Assisted Living Dentist's Office Coworking Space Synagogue Pizza Place
Park Hill_NYC 1 Residential Building (Apartment / Condo) Doctor's Office Salon / Barbershop Athletics & Sports Professional & Other Places Park Other Great Outdoors
Pelham Gardens_NYC 1 Doctor's Office Pizza Place Pharmacy Playground Other Great Outdoors Dentist's Office Garden
Pelham Parkway_NYC 1 Doctor's Office Dentist's Office Residential Building (Apartment / Condo) Deli / Bodega Diner Pizza Place Salon / Barbershop
Pomonok_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Playground Dentist's Office Elementary School Salon / Barbershop Medical Center
Randall Manor_NYC 1 Doctor's Office High School Residential Building (Apartment / Condo) Park College Classroom Medical Center Deli / Bodega
Rego Park_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Medical Center Dentist's Office Professional & Other Places Mediterranean Restaurant General College & University
Rockaway Park_NYC 1 Beach Doctor's Office Eye Doctor Bakery Restaurant Track Medical Center
Schuylerville_NYC 1 Doctor's Office Salon / Barbershop Deli / Bodega Professional & Other Places Pizza Place Pharmacy Mental Health Office
South Beach_NYC 1 Hospital Medical Center Doctor's Office Beach Dentist's Office Deli / Bodega College Communications Building
Starrett City_NYC 1 Doctor's Office Laundry Service Residential Building (Apartment / Condo) Parking Pharmacy Salon / Barbershop Medical Center
Sunnyside, Staten Island_NYC 1 Doctor's Office Theater College Residence Hall College Library Dance Studio College Administrative Building College Arts Building
Todt Hill_NYC 1 Doctor's Office Professional & Other Places Nail Salon School Laundry Service Bagel Shop Dog Run
Tudor City_NYC 1 Doctor's Office Residential Building (Apartment / Condo) Medical Center Gym Laundry Service Hospital Assisted Living
Upper East Side_NYC 1 Doctor's Office Art Gallery Residential Building (Apartment / Condo) Medical Center Dentist's Office Library Spa
Bathurst Manor, Wilson Heights, Downsview North_Toronto 1 Doctor's Office Residential Building (Apartment / Condo) Medical Center Synagogue Bank Spa Ice Cream Shop
Summerhill West, Rathnelly, South Hill, Forest Hill SE, Deer Park_Toronto 1 Residential Building (Apartment / Condo) Doctor's Office Dentist's Office Medical Center Taxi Light Rail Station Athletics & Sports
Cluster 3
In [92]:
c3 = nyc_tor_merged.loc[nyc_tor_merged['Cluster Labels'] == 2, :]
print(c3.shape)
c3.tail()
(63, 8)
Out[92]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood
The Annex, North Midtown, Yorkville_Toronto 2 Residential Building (Apartment / Condo) Bed & Breakfast Japanese Restaurant Metro Station Playground Miscellaneous Shop Sandwich Place
Victoria Village_Toronto 2 Residential Building (Apartment / Condo) Automotive Shop Grocery Store Government Building Auto Dealership Playground Transportation Service
Willowdale, Willowdale West_Toronto 2 Residential Building (Apartment / Condo) Park Medical Center Bank Synagogue Pizza Place Financial or Legal Service
York Mills West_Toronto 2 Residential Building (Apartment / Condo) Gym Park Medical Center Church School Dentist's Office
York Mills, Silver Hills_Toronto 2 Residential Building (Apartment / Condo) Park High School Church Pool School Synagogue
Cluster 4
In [93]:
c4 = nyc_tor_merged.loc[nyc_tor_merged['Cluster Labels'] == 3, :]
print(c4.shape)
c4
(103, 8)
Out[93]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood
Allerton_NYC 3 Salon / Barbershop Laundry Service Food Gas Station Pizza Place Non-Profit Car Wash
Annadale_NYC 3 Pizza Place Salon / Barbershop Nail Salon Tattoo Parlor American Restaurant Pet Store Bagel Shop
Arrochar_NYC 3 Deli / Bodega Pizza Place Food Truck Dry Cleaner Dance Studio Doctor's Office Bar
Astoria Heights_NYC 3 Laundry Service Deli / Bodega General Travel Playground Chinese Restaurant Gas Station Italian Restaurant
Bath Beach_NYC 3 Deli / Bodega Pizza Place Residential Building (Apartment / Condo) Salon / Barbershop Gas Station Doctor's Office Restaurant
Bay Ridge_NYC 3 Residential Building (Apartment / Condo) Salon / Barbershop Cosmetics Shop Spa Italian Restaurant Pizza Place Deli / Bodega
Bedford Stuyvesant_NYC 3 Deli / Bodega School Grocery Store Salon / Barbershop Laundry Service Bike Rental / Bike Share Church
Beechhurst_NYC 3 Salon / Barbershop Bank Doctor's Office Chinese Restaurant Pizza Place Pharmacy Dentist's Office
Bellaire_NYC 3 Chinese Restaurant Deli / Bodega Salon / Barbershop Pizza Place Hospital Residential Building (Apartment / Condo) Gas Station
Bellerose_NYC 3 Dentist's Office Automotive Shop Pizza Place Deli / Bodega Salon / Barbershop Flower Shop Italian Restaurant
Belmont_NYC 3 Salon / Barbershop Deli / Bodega Italian Restaurant School Dessert Shop Park Bakery
Bensonhurst_NYC 3 Doctor's Office Nail Salon Design Studio Italian Restaurant Gas Station Park Salon / Barbershop
Boerum Hill_NYC 3 Salon / Barbershop Doctor's Office General Entertainment Event Space Playground Thrift / Vintage Store Residential Building (Apartment / Condo)
Cambria Heights_NYC 3 Doctor's Office Caribbean Restaurant Salon / Barbershop Cosmetics Shop Dentist's Office Church Lounge
Canarsie_NYC 3 Salon / Barbershop Caribbean Restaurant Chinese Restaurant Doctor's Office Deli / Bodega Grocery Store Cemetery
Central Harlem_NYC 3 Salon / Barbershop Residential Building (Apartment / Condo) Mountain Gym / Fitness Center Church Deli / Bodega Cocktail Bar
City Line_NYC 3 Salon / Barbershop Nail Salon Miscellaneous Shop Chinese Restaurant Cosmetics Shop Convenience Store Deli / Bodega
Claremont Village_NYC 3 Salon / Barbershop Medical Center Deli / Bodega Pizza Place Pharmacy Chinese Restaurant Cosmetics Shop
Clinton Hill_NYC 3 Residential Building (Apartment / Condo) Liquor Store Deli / Bodega Miscellaneous Shop Restaurant Salon / Barbershop Lounge
Concourse Village_NYC 3 Deli / Bodega Residential Building (Apartment / Condo) Salon / Barbershop Chinese Restaurant Park Non-Profit Other Nightlife
Corona_NYC 3 Salon / Barbershop Mexican Restaurant Deli / Bodega Doctor's Office Liquor Store Bakery Food
Crown Heights_NYC 3 Residential Building (Apartment / Condo) Salon / Barbershop Pizza Place Deli / Bodega Laundry Service Grocery Store Lounge
Cypress Hills_NYC 3 Salon / Barbershop Nail Salon Deli / Bodega Laundry Service Latin American Restaurant Pizza Place Chinese Restaurant
Douglaston_NYC 3 Salon / Barbershop Italian Restaurant Church Deli / Bodega Thai Restaurant Pizza Place Korean Restaurant
East Elmhurst_NYC 3 Salon / Barbershop Gas Station Church Playground Plane Pizza Place Nail Salon
East Flatbush_NYC 3 Deli / Bodega Salon / Barbershop Caribbean Restaurant Dentist's Office Church Chinese Restaurant School
East New York_NYC 3 Salon / Barbershop Deli / Bodega Chinese Restaurant Laundry Service Nail Salon Spanish Restaurant School
East Tremont_NYC 3 Salon / Barbershop Cosmetics Shop Food Chinese Restaurant Shoe Store Church Residential Building (Apartment / Condo)
Edenwald_NYC 3 Salon / Barbershop Residential Building (Apartment / Condo) Church Deli / Bodega Liquor Store Gas Station Laundry Service
Edgewater Park_NYC 3 Italian Restaurant Deli / Bodega Chinese Restaurant Automotive Shop Salon / Barbershop Pharmacy Medical Center
Elm Park_NYC 3 Deli / Bodega Salon / Barbershop Restaurant Pizza Place School Automotive Shop Laundry Service
Eltingville_NYC 3 Salon / Barbershop Nail Salon Butcher Pizza Place Medical Center Bagel Shop Automotive Shop
Erasmus_NYC 3 Salon / Barbershop Bakery Caribbean Restaurant Bar Food General Entertainment Other Great Outdoors
Far Rockaway_NYC 3 Salon / Barbershop Deli / Bodega Chinese Restaurant Automotive Shop Nail Salon Cosmetics Shop Pizza Place
Flatlands_NYC 3 Salon / Barbershop Automotive Shop Caribbean Restaurant Pharmacy Church Laundry Service Bar
Floral Park_NYC 3 Indian Restaurant Lounge Doctor's Office Salon / Barbershop Grocery Store Dentist's Office Ice Cream Shop
Gravesend_NYC 3 Automotive Shop Deli / Bodega Salon / Barbershop Bakery Pharmacy Spa Furniture / Home Store
Great Kills_NYC 3 Salon / Barbershop Doctor's Office Nail Salon Pizza Place Bar Italian Restaurant Bank
High Bridge_NYC 3 Salon / Barbershop Residential Building (Apartment / Condo) Deli / Bodega Pharmacy Laundry Service Chinese Restaurant Grocery Store
Highland Park_NYC 3 Salon / Barbershop Church Laundry Service Liquor Store Moving Target Deli / Bodega Metro Station
Hollis_NYC 3 Salon / Barbershop Automotive Shop Caribbean Restaurant Church Fried Chicken Joint Bakery Laundry Service
Homecrest_NYC 3 Salon / Barbershop Chinese Restaurant Asian Restaurant Eastern European Restaurant Bakery Grocery Store Fast Food Restaurant
Howard Beach_NYC 3 Salon / Barbershop Italian Restaurant Pharmacy Jewelry Store Bridge Doctor's Office Sandwich Place
Huguenot_NYC 3 Salon / Barbershop Doctor's Office Deli / Bodega Bank Ice Cream Shop Other Great Outdoors Flower Shop
Hunters Point_NYC 3 Deli / Bodega Salon / Barbershop Plaza Nail Salon Thai Restaurant Food Truck Mexican Restaurant
Inwood_NYC 3 Salon / Barbershop Deli / Bodega Residential Building (Apartment / Condo) Nail Salon Laundry Service Government Building Mexican Restaurant
Jamaica Center_NYC 3 Clothing Store Department Store Salon / Barbershop Optical Shop Kids Store Government Building Grocery Store
Jamaica Hills_NYC 3 Salon / Barbershop Indian Restaurant Grocery Store Residential Building (Apartment / Condo) Dentist's Office Chinese Restaurant Asian Restaurant
Kingsbridge_NYC 3 Laundry Service Bank Salon / Barbershop Boutique Medical Center Discount Store Pet Store
Laurelton_NYC 3 Salon / Barbershop Caribbean Restaurant Gas Station Church Deli / Bodega Financial or Legal Service Nail Salon
Little Italy_NYC 3 Italian Restaurant Salon / Barbershop Smoke Shop Gift Shop Gourmet Shop Accessories Store Lounge
Little Neck_NYC 3 Salon / Barbershop Chinese Restaurant School Laundry Service Food Korean Restaurant Bagel Shop
Longwood_NYC 3 Pizza Place Automotive Shop Train Mexican Restaurant Grocery Store Salon / Barbershop Food
Manhattan Valley_NYC 3 Deli / Bodega Salon / Barbershop Check Cashing Service Trailer Park Laundry Service Chinese Restaurant Residential Building (Apartment / Condo)
Marble Hill_NYC 3 Deli / Bodega Salon / Barbershop High School Church Laundry Service Residential Building (Apartment / Condo) Furniture / Home Store
Maspeth_NYC 3 Pizza Place Nail Salon Dentist's Office Grocery Store Bank Hardware Store Salon / Barbershop
Middle Village_NYC 3 Bakery Cosmetics Shop Chinese Restaurant Salon / Barbershop Ice Cream Shop Dance Studio Thai Restaurant
Mill Basin_NYC 3 Dentist's Office Gas Station Salon / Barbershop Doctor's Office Chinese Restaurant Laundry Service Baseball Field
Mount Hope_NYC 3 Salon / Barbershop Residential Building (Apartment / Condo) Church Automotive Shop Chinese Restaurant Deli / Bodega Financial or Legal Service
New Brighton_NYC 3 Deli / Bodega Church Park Playground Housing Development Laundry Service Residential Building (Apartment / Condo)
New Dorp_NYC 3 Salon / Barbershop Italian Restaurant Mexican Restaurant Spa Pet Store Bakery Chiropractor
New Lots_NYC 3 Church Salon / Barbershop Deli / Bodega Chinese Restaurant Grocery Store Laundry Service Food
North Corona_NYC 3 Deli / Bodega Salon / Barbershop Latin American Restaurant Mexican Restaurant Food Truck Laundry Service Hotel
Ocean Hill_NYC 3 Deli / Bodega Residential Building (Apartment / Condo) Salon / Barbershop Church Laundry Service Metro Station Elementary School
Olinville_NYC 3 Salon / Barbershop Deli / Bodega Caribbean Restaurant Chinese Restaurant Residential Building (Apartment / Condo) Food Health & Beauty Service
Ozone Park_NYC 3 Deli / Bodega Pizza Place Liquor Store Pharmacy Nail Salon Spanish Restaurant Tattoo Parlor
Paerdegat Basin_NYC 3 Doctor's Office Salon / Barbershop Harbor / Marina Food Caribbean Restaurant Other Nightlife School
Parkchester_NYC 3 Salon / Barbershop Laundry Service Residential Building (Apartment / Condo) Indian Restaurant Convenience Store School Food
Pelham Bay_NYC 3 Salon / Barbershop Medical Center Chinese Restaurant Residential Building (Apartment / Condo) Convenience Store Bagel Shop Doctor's Office
Pleasant Plains_NYC 3 Salon / Barbershop Pizza Place Bakery Tattoo Parlor Funeral Home Dessert Shop Tanning Salon
Prince's Bay_NYC 3 Salon / Barbershop Doctor's Office Church Other Great Outdoors Bank Dentist's Office Pizza Place
Queens Village_NYC 3 Food Financial or Legal Service Caribbean Restaurant Nail Salon Bank Church Salon / Barbershop
Remsen Village_NYC 3 Salon / Barbershop Church Automotive Shop Caribbean Restaurant Fast Food Restaurant Laundry Service Food
Richmond Hill_NYC 3 Pizza Place Convenience Store Bakery Doctor's Office Latin American Restaurant Nail Salon Residential Building (Apartment / Condo)
Richmond Valley_NYC 3 Salon / Barbershop Bakery Fast Food Restaurant Pizza Place Automotive Shop Nail Salon Convenience Store
Ridgewood_NYC 3 Deli / Bodega Hardware Store Greek Restaurant Grocery Store Cosmetics Shop Residential Building (Apartment / Condo) Italian Restaurant
Rosedale_NYC 3 Salon / Barbershop Caribbean Restaurant Gas Station Cosmetics Shop Fried Chicken Joint Laundry Service Pharmacy
Rugby_NYC 3 Caribbean Restaurant Salon / Barbershop Laundry Service Chinese Restaurant Food Deli / Bodega Elementary School
Shore Acres_NYC 3 Deli / Bodega Salon / Barbershop Italian Restaurant Miscellaneous Shop Concert Hall Bar Dentist's Office
St. Albans_NYC 3 Salon / Barbershop Caribbean Restaurant Deli / Bodega Laundry Service Church Dance Studio Lounge
Stapleton_NYC 3 Food Salon / Barbershop Church Pizza Place Bank Deli / Bodega Cosmetics Shop
Sunset Park_NYC 3 Salon / Barbershop Pizza Place Optical Shop Mobile Phone Shop Women's Store Shoe Store Department Store
Tompkinsville_NYC 3 Salon / Barbershop Mexican Restaurant Church Pizza Place Caribbean Restaurant Grocery Store Deli / Bodega
Unionport_NYC 3 Salon / Barbershop Laundry Service Deli / Bodega Spanish Restaurant Shoe Store Other Nightlife Church
University Heights_NYC 3 College Academic Building Deli / Bodega Salon / Barbershop Bar Supermarket Discount Store Pizza Place
Van Nest_NYC 3 Deli / Bodega Nail Salon Laundry Service Salon / Barbershop Pizza Place Chinese Restaurant Church
Wakefield_NYC 3 Salon / Barbershop Laundry Service Coworking Space Food Doctor's Office Church Gas Station
Weeksville_NYC 3 Automotive Shop Caribbean Restaurant Salon / Barbershop Residential Building (Apartment / Condo) Deli / Bodega Chinese Restaurant Other Great Outdoors
Whitestone_NYC 3 Deli / Bodega Italian Restaurant Gym Salon / Barbershop Other Great Outdoors Playground Bar
Williamsbridge_NYC 3 Church Salon / Barbershop Caribbean Restaurant School Nail Salon Nightclub Spa
Willowbrook_NYC 3 Synagogue Deli / Bodega Church Laundry Service Salon / Barbershop Dance Studio Chinese Restaurant
Wingate_NYC 3 Salon / Barbershop School Deli / Bodega Caribbean Restaurant Event Space Food Residential Building (Apartment / Condo)
Woodhaven_NYC 3 Deli / Bodega Salon / Barbershop Laundry Service Miscellaneous Shop Liquor Store Doctor's Office Chinese Restaurant
Woodlawn_NYC 3 Bar Deli / Bodega Salon / Barbershop Pub Church Food & Drink Shop Pizza Place
Woodside_NYC 3 Bar Salon / Barbershop Mexican Restaurant Thai Restaurant Platform Deli / Bodega Miscellaneous Shop
Bedford Park, Lawrence Manor East_Toronto 3 Salon / Barbershop Italian Restaurant Medical Center Sushi Restaurant Sandwich Place Nail Salon Hobby Shop
Caledonia-Fairbanks_Toronto 3 Salon / Barbershop Bakery Convenience Store Church Residential Building (Apartment / Condo) Park Laundry Service
Davisville_Toronto 3 Coffee Shop Salon / Barbershop Italian Restaurant Flower Shop Nail Salon Café Bookstore
Eringate, Bloordale Gardens, Old Burnhamthorpe, Markland Wood_Toronto 3 Salon / Barbershop Park Dentist's Office Church Doctor's Office Bank Electronics Store
Kensington Market, Chinatown, Grange Park_Toronto 3 Salon / Barbershop Thrift / Vintage Store Boutique Vietnamese Restaurant Art Gallery Women's Store Bar
South Steeles, Silverstone, Humbergate, Jamestown, Mount Olive, Beaumond Heights, Thistletown, Albion Gardens_Toronto 3 Salon / Barbershop Movie Theater Spiritual Center Farm Art Gallery Bakery Clothing Store
The Kingsway, Montgomery Road, Old Mill North_Toronto 3 Salon / Barbershop Bank Miscellaneous Shop Doctor's Office Spa Nail Salon Medical Center
Weston_Toronto 3 Pizza Place Salon / Barbershop Residential Building (Apartment / Condo) Church Park Doctor's Office Caribbean Restaurant
Cluster 5
In [94]:
c5 = nyc_tor_merged.loc[nyc_tor_merged['Cluster Labels'] == 4, :]
print(c5.shape)
c5
(178, 8)
Out[94]:
Cluster Labels 1st Most Common Category 2nd Most Common Category 3rd Most Common Category 4th Most Common Category 5th Most Common Category 6th Most Common Category 7th Most Common Category
Neighborhood
Arden Heights_NYC 4 Professional & Other Places Doctor's Office Church Dentist's Office Bar Gym General Entertainment
Arlington_NYC 4 Church Hardware Store Salon / Barbershop Professional & Other Places Residential Building (Apartment / Condo) Automotive Shop American Restaurant
Arverne_NYC 4 Surf Spot Bank Housing Development Playground Sandwich Place Deli / Bodega Beach
Bay Terrace, Staten Island_NYC 4 Italian Restaurant Dentist's Office Housing Development Gas Station Dog Run Donut Shop Deli / Bodega
Baychester_NYC 4 Gas Station Chinese Restaurant Gym / Fitness Center Residential Building (Apartment / Condo) Fast Food Restaurant Other Great Outdoors Automotive Shop
Bayside_NYC 4 Greek Restaurant Salon / Barbershop Doctor's Office Café Pharmacy Spa Dentist's Office
Bayswater_NYC 4 Plane Salon / Barbershop Laundry Service Gas Station Church Financial or Legal Service Chinese Restaurant
Belle Harbor_NYC 4 Beach Boutique School Doctor's Office Salon / Barbershop Spa Garden
Bergen Beach_NYC 4 Doctor's Office Playground Salon / Barbershop Dentist's Office Event Space Park Dog Run
Borough Park_NYC 4 Synagogue College Academic Building Bank Clothing Store Jewelry Store Smoothie Shop Arts & Crafts Store
Breezy Point_NYC 4 Beach Bar Monument / Landmark Trail Other Great Outdoors Surf Spot Basketball Court
Brighton Beach_NYC 4 Salon / Barbershop Mobile Phone Shop Gourmet Shop Restaurant Pharmacy Health & Beauty Service Eastern European Restaurant
Broad Channel_NYC 4 Plane Harbor / Marina Park Deli / Bodega Church Fast Food Restaurant Bridge
Broadway Junction_NYC 4 High School Metro Station Automotive Shop Deli / Bodega Other Great Outdoors Playground Caribbean Restaurant
Brookville_NYC 4 Doctor's Office Park Deli / Bodega Salon / Barbershop Warehouse Other Nightlife Chinese Restaurant
Brownsville_NYC 4 Church Deli / Bodega Residential Building (Apartment / Condo) School Housing Development Park Pizza Place
Bushwick_NYC 4 Thrift / Vintage Store Residential Building (Apartment / Condo) Coffee Shop Deli / Bodega Bar Taco Place Radio Station
Butler Manor_NYC 4 Italian Restaurant Beach Baseball Field Park School Doctor's Office Burger Joint
Carroll Gardens_NYC 4 Residential Building (Apartment / Condo) Deli / Bodega Food Truck School Laundry Service Convenience Store Italian Restaurant
Castle Hill_NYC 4 Residential Building (Apartment / Condo) School Spanish Restaurant Food Emergency Room Medical Center Financial or Legal Service
Charleston_NYC 4 Doctor's Office Salon / Barbershop Miscellaneous Shop Pizza Place Emergency Room Shoe Store Department Store
Chelsea, Manhattan_NYC 4 High School Deli / Bodega Ice Cream Shop Taxi General Entertainment Lounge Food Truck
Chelsea, Staten Island_NYC 4 Salon / Barbershop Automotive Shop Ice Cream Shop Gym Park Pizza Place Church
Chinatown_NYC 4 Chinese Restaurant Bakery Bridge Park Asian Restaurant Miscellaneous Shop Spa
City Island_NYC 4 Harbor / Marina Ice Cream Shop Sporting Goods Shop Playground Residential Building (Apartment / Condo) Pharmacy Deli / Bodega
Civic Center_NYC 4 Government Building Coworking Space Doctor's Office Food Truck Lawyer Residential Building (Apartment / Condo) Gym
Clason Point_NYC 4 Park Housing Development Salon / Barbershop Lounge Event Space Automotive Shop Pool
Clifton_NYC 4 Gas Station Hospital Salon / Barbershop Automotive Shop Pizza Place Hardware Store Mexican Restaurant
Clinton_NYC 4 Theater Restaurant General Entertainment Laundry Service Concert Hall Gym / Fitness Center Parking
Co-op City_NYC 4 Residential Building (Apartment / Condo) School Church Other Great Outdoors Park Laundry Service Liquor Store
Coney Island_NYC 4 Residential Building (Apartment / Condo) Housing Development Deli / Bodega Police Station Park Medical Center Beach
Country Club_NYC 4 Deli / Bodega Pizza Place Coffee Shop Nail Salon Bar Salon / Barbershop Playground
Downtown_NYC 4 Shoe Store Gym / Fitness Center American Restaurant Residential Building (Apartment / Condo) Bar Italian Restaurant Burger Joint
Dumbo_NYC 4 Art Gallery Tech Startup Food Stand Event Space Food Truck Salon / Barbershop Bookstore
East Harlem_NYC 4 Residential Building (Apartment / Condo) Pizza Place Clothing Store Church Deli / Bodega Lawyer Bar
Edgemere_NYC 4 Medical Center Dog Run Residential Building (Apartment / Condo) Beach Pizza Place Church Metro Station
Fieldston_NYC 4 Synagogue Residential Building (Apartment / Condo) College Administrative Building College Residence Hall College Quad College Academic Building Historic Site
Financial District_NYC 4 Historic Site Bar Food Truck Doctor's Office Pet Service Financial or Legal Service Movie Theater
Flatiron_NYC 4 Tech Startup Sporting Goods Shop Clothing Store Gym / Fitness Center Women's Store Boutique Furniture / Home Store
Flushing_NYC 4 Bar Karaoke Bar Korean Restaurant Chinese Restaurant Hotel Church Residential Building (Apartment / Condo)
Fordham_NYC 4 Clothing Store Deli / Bodega Doctor's Office Shoe Store Nail Salon Bank Women's Store
Fox Hills_NYC 4 Residential Building (Apartment / Condo) Professional & Other Places Chinese Restaurant Housing Development Playground School Salon / Barbershop
Fulton Ferry_NYC 4 Food Truck Pizza Place American Restaurant Park Boat or Ferry Beer Garden Scenic Lookout
Gerritsen Beach_NYC 4 Gas Station Bar Housing Development Professional & Other Places Boat or Ferry Ice Cream Shop Bike Shop
Glen Oaks_NYC 4 Hospital Playground Bank Laundry Service Residential Building (Apartment / Condo) Pizza Place Salon / Barbershop
Gowanus_NYC 4 Art Gallery Design Studio Coworking Space Metro Station Factory General Entertainment Food Truck
Graniteville_NYC 4 Dentist's Office Nail Salon Doctor's Office Taxi Automotive Shop Residential Building (Apartment / Condo) Elementary School
Grant City_NYC 4 Doctor's Office Asian Restaurant Cosmetics Shop Fast Food Restaurant Pizza Place Nail Salon Police Station
Grasmere_NYC 4 Doctor's Office Residential Building (Apartment / Condo) Chinese Restaurant Dentist's Office Food Bagel Shop Church
Greenpoint_NYC 4 Deli / Bodega Doctor's Office Butcher Residential Building (Apartment / Condo) Coffee Shop Dentist's Office Gym / Fitness Center
Grymes Hill_NYC 4 Residential Building (Apartment / Condo) Church College Administrative Building College & University Salon / Barbershop Dog Run Daycare
Hammels_NYC 4 Beach Residential Building (Apartment / Condo) Church Transportation Service Automotive Shop Bakery Dog Run
Hillcrest_NYC 4 College Academic Building General College & University University College Cafeteria Medical Center College Classroom Salon / Barbershop
Howland Hook_NYC 4 Boat or Ferry Food Factory Automotive Shop Bar Harbor / Marina Government Building
Hudson Yards_NYC 4 Medical Center Furniture / Home Store Food Truck Train Station Bike Rental / Bike Share General Travel Donut Shop
Jamaica Estates_NYC 4 Church School Shipping Store Playground Beer Garden High School Speakeasy
Kensington_NYC 4 Grocery Store Bank Deli / Bodega Doctor's Office Mexican Restaurant Food Truck Liquor Store
Kew Gardens Hills_NYC 4 Doctor's Office Dentist's Office Bank Convenience Store School Middle Eastern Restaurant Playground
Lighthouse Hill_NYC 4 History Museum Italian Restaurant Church Gas Station Café Bagel Shop Salon / Barbershop
Lincoln Square_NYC 4 Theater Performing Arts Venue High School Concert Hall Residential Building (Apartment / Condo) Plaza Opera House
Malba_NYC 4 Park Food Truck Chinese Restaurant Coworking Space Nail Salon Rock Club Trade School
Manhattan Beach_NYC 4 Harbor / Marina Boat or Ferry Turkish Restaurant Dessert Shop Sandwich Place Bagel Shop Dog Run
Manor Heights_NYC 4 Laundry Service Doctor's Office Donut Shop Liquor Store Pharmacy Salon / Barbershop Burger Joint
Marine Park_NYC 4 Park American Restaurant Nail Salon Doctor's Office Laundry Service Deli / Bodega Coffee Shop
Midland Beach_NYC 4 Baseball Field General Travel Deli / Bodega Non-Profit Pet Store Beach Other Great Outdoors
Midtown_NYC 4 General College & University Shoe Store College Administrative Building Tailor Shop Design Studio General Entertainment Dance Studio
Midtown South_NYC 4 Taxi American Restaurant Food Stand Spa Event Space Hotel Jewelry Store
Mill Island_NYC 4 Pool Harbor / Marina Middle Eastern Restaurant Salon / Barbershop Other Great Outdoors Moving Target Convenience Store
Morningside Heights_NYC 4 Food Truck College Residence Hall College Academic Building Student Center Coffee Shop College Classroom College Quad
Morrisania_NYC 4 High School Residential Building (Apartment / Condo) Church Chinese Restaurant Deli / Bodega Housing Development Dentist's Office
Murray Hill, Queens_NYC 4 Korean Restaurant Bakery Doctor's Office Laundry Service Salon / Barbershop Hardware Store Gas Station
Neponsit_NYC 4 Beach School Park Boutique Deli / Bodega Garden Synagogue
New Dorp Beach_NYC 4 Salon / Barbershop Italian Restaurant Deli / Bodega Scenic Lookout General Entertainment Sports Bar Baseball Field
Noho_NYC 4 Bar Residential Building (Apartment / Condo) Salon / Barbershop Deli / Bodega Cocktail Bar General Entertainment Thai Restaurant
North Riverdale_NYC 4 Mobile Phone Shop Salon / Barbershop Pizza Place Bank Gym Deli / Bodega Spa
North Side_NYC 4 Residential Building (Apartment / Condo) Bar Wine Bar Clothing Store Event Space Food Truck Vegetarian / Vegan Restaurant
Oakland Gardens_NYC 4 Korean Restaurant Chinese Restaurant Dentist's Office Laundry Service Pharmacy Sushi Restaurant Daycare
Old Town_NYC 4 Medical Center Bank Cosmetics Shop Bakery Italian Restaurant Auto Dealership Pizza Place
Park Slope_NYC 4 Residential Building (Apartment / Condo) Nail Salon Laundry Service Toy / Game Store Deli / Bodega Japanese Restaurant Pizza Place
Port Ivory_NYC 4 Boat or Ferry Automotive Shop Park Playground Housing Development Residential Building (Apartment / Condo) Pier
Port Morris_NYC 4 Factory Residential Building (Apartment / Condo) Government Building Plane Latin American Restaurant Distillery Hardware Store
Queensboro Hill_NYC 4 Chinese Restaurant Doctor's Office Asian Restaurant Hospital Medical Center Bank Hospital Ward
Queensbridge_NYC 4 Hotel Deli / Bodega Miscellaneous Shop Storage Facility Playground Gym / Fitness Center Laundry Service
Red Hook_NYC 4 Art Gallery Furniture / Home Store Deli / Bodega Wine Shop Bike Shop Bar Coffee Shop
Richmond Town_NYC 4 Dentist's Office Grocery Store School Laundry Service Italian Restaurant Miscellaneous Shop Professional & Other Places
Rockaway Beach_NYC 4 Beach Residential Building (Apartment / Condo) Deli / Bodega Pizza Place Seafood Restaurant Surf Spot BBQ Joint
Rosebank_NYC 4 Pizza Place General Entertainment Ice Cream Shop Nail Salon Mexican Restaurant Italian Restaurant Chinese Restaurant
Rossville_NYC 4 General Entertainment Pizza Place Athletics & Sports Automotive Shop Medical Center Bar Other Great Outdoors
Roxbury_NYC 4 Beach Bar Theater Fire Station Seafood Restaurant Baseball Field Hardware Store
Sandy Ground_NYC 4 General Entertainment Athletics & Sports Other Great Outdoors Elementary School Other Nightlife Bookstore Doctor's Office
Sea Gate_NYC 4 Beach Housing Development Residential Building (Apartment / Condo) Event Space Chinese Restaurant Dog Run Deli / Bodega
Sheepshead Bay_NYC 4 Harbor / Marina Residential Building (Apartment / Condo) Boat or Ferry Other Great Outdoors Park Playground Fishing Spot
Soho_NYC 4 Boutique Clothing Store Jewelry Store Women's Store Event Space Furniture / Home Store Men's Store
Somerville_NYC 4 Automotive Shop Sandwich Place Harbor / Marina Board Shop Airport Gate Plane Pizza Place
South Ozone Park_NYC 4 Gas Station Government Building Deli / Bodega Park Taxi Moving Target Parking
Springfield Gardens_NYC 4 Church Gas Station Deli / Bodega Chinese Restaurant Automotive Shop Fried Chicken Joint High School
St. George_NYC 4 Deli / Bodega Courthouse Government Building College Classroom College Gym Residential Building (Apartment / Condo) Chinese Restaurant
Steinway_NYC 4 Automotive Shop Pizza Place Gym / Fitness Center Deli / Bodega Baseball Field Rental Car Location Salon / Barbershop
Throgs Neck_NYC 4 Other Great Outdoors Chinese Restaurant Italian Restaurant Residential Building (Apartment / Condo) Deli / Bodega Pizza Place Miscellaneous Shop
Tottenville_NYC 4 Italian Restaurant School Temple Church Beach Dog Run Salon / Barbershop
Travis_NYC 4 Automotive Shop Park Hotel Bar Pizza Place Italian Restaurant Bowling Alley
Tribeca_NYC 4 Residential Building (Apartment / Condo) General Entertainment Food Truck American Restaurant Café Bar Convenience Store
Utopia_NYC 4 Automotive Shop Deli / Bodega Playground Laundry Service Elementary School Park School
Vinegar Hill_NYC 4 Tech Startup Art Gallery Residential Building (Apartment / Condo) General Entertainment Event Space Bike Rental / Bike Share Massage Studio
West Brighton_NYC 4 Doctor's Office Bank Gift Shop Pizza Place Bagel Shop Breakfast Spot Salon / Barbershop
West Farms_NYC 4 Automotive Shop School Doctor's Office Residential Building (Apartment / Condo) Post Office Deli / Bodega Moving Target
Westchester Square_NYC 4 Salon / Barbershop Convenience Store Nightclub Automotive Shop Fast Food Restaurant Nail Salon Cosmetics Shop
Westerleigh_NYC 4 Doctor's Office Salon / Barbershop Dive Bar Financial or Legal Service Bank Nail Salon Sushi Restaurant
Williamsburg_NYC 4 Residential Building (Apartment / Condo) Pizza Place Salon / Barbershop Gym Park Chinese Restaurant Train
Windsor Terrace_NYC 4 Doctor's Office Middle School Bridge Hardware Store Deli / Bodega School Grocery Store
Woodrow_NYC 4 Pool Grocery Store School Physical Therapist Dentist's Office Salon / Barbershop Bar
Alderwood, Long Branch_Toronto 4 Convenience Store Salon / Barbershop Spa Dentist's Office Gas Station Daycare Bank
Bayview Village_Toronto 4 Salon / Barbershop Doctor's Office Church Dog Run Bank Grocery Store Japanese Restaurant
Berczy Park_Toronto 4 Residential Building (Apartment / Condo) Parking Laundry Service Food Truck Korean Restaurant Tech Startup General Entertainment
Birch Cliff, Cliffside West_Toronto 4 General Entertainment Church Indian Restaurant Antique Shop Pizza Place Bar Gym
Business reply mail Processing Centre, South Central Letter Processing Plant Toronto_Toronto 4 Light Rail Station Fast Food Restaurant Antique Shop Government Building Athletics & Sports Theater Medical Center
CN Tower, King and Spadina, Railway Lands, Harbourfront West, Bathurst Quay, South Niagara, Island airport_Toronto 4 Plane Airport Gate Airport Service Moving Target Airport Terminal Coffee Shop Airport Lounge
Canada Post Gateway Processing Centre_Toronto 4 Hotel Convenience Store Breakfast Spot Chinese Restaurant Conference Room Intersection Auto Dealership
Cedarbrae_Toronto 4 Bakery Medical Center Doctor's Office Laundry Service Automotive Shop Caribbean Restaurant Burger Joint
Central Bay Street_Toronto 4 Hospital Hospital Ward Medical Center Coffee Shop Pharmacy Emergency Room Food Court
Christie_Toronto 4 Café Design Studio Automotive Shop Grocery Store Furniture / Home Store Laundry Service Bakery
Clarks Corners, Tam O'Shanter, Sullivan_Toronto 4 Doctor's Office Dentist's Office Automotive Shop Bank Gas Station Fast Food Restaurant Pizza Place
Cliffside, Cliffcrest, Scarborough Village West_Toronto 4 Pizza Place Salon / Barbershop Laundry Service Convenience Store Church Dentist's Office Park
Commerce Court, Victoria Hotel_Toronto 4 Coffee Shop Financial or Legal Service Dentist's Office Salon / Barbershop Bank Video Game Store Deli / Bodega
Del Ray, Mount Dennis, Keelsdale and Silverthorn_Toronto 4 Convenience Store Residential Building (Apartment / Condo) Courthouse Bank Hospital Skating Rink Fast Food Restaurant
Don Mills_Toronto 4 Medical Center Automotive Shop Church Coworking Space General College & University Doctor's Office Tech Startup
Downsview_Toronto 4 Residential Building (Apartment / Condo) Vietnamese Restaurant Park Bank Coffee Shop Salon / Barbershop Pharmacy
Dufferin, Dovercourt Village_Toronto 4 Automotive Shop Park Church Portuguese Restaurant Furniture / Home Store Jewelry Store Dog Run
East Toronto, Broadview North (Old East York)_Toronto 4 Convenience Store Park Intersection Church Bookstore Caribbean Restaurant Middle Eastern Restaurant
Fairview, Henry Farm, Oriole_Toronto 4 Clothing Store Shoe Store Women's Store Doctor's Office Optical Shop Cosmetics Shop Jewelry Store
First Canadian Place, Underground city_Toronto 4 Coffee Shop Bakery Cosmetics Shop Salon / Barbershop Dentist's Office Clothing Store Health & Beauty Service
Forest Hill North & West, Forest Hill Road Park_Toronto 4 Dentist's Office Gym / Fitness Center Medical Center Doctor's Office Park Jewelry Store Tech Startup
Garden District, Ryerson_Toronto 4 College Lab University College Communications Building General College & University Parking College Administrative Building Student Center
Glencairn_Toronto 4 Convenience Store Salon / Barbershop Nail Salon Grocery Store Pizza Place Café Metro Station
Golden Mile, Clairlea, Oakridge_Toronto 4 Parking Park Residential Building (Apartment / Condo) Doctor's Office Diner Automotive Shop Gym
Guildwood, Morningside, West Hill_Toronto 4 Electronics Store Residential Building (Apartment / Condo) Restaurant Church Thrift / Vintage Store Medical Center Tech Startup
High Park, The Junction South_Toronto 4 Church Government Building Nightlife Spot Gas Station Historic Site Library Dog Run
Hillcrest Village_Toronto 4 School Bank Medical Center Post Office Miscellaneous Shop Residential Building (Apartment / Condo) Park
Humberlea, Emery_Toronto 4 Factory Furniture / Home Store Hardware Store Residential Building (Apartment / Condo) Church Coffee Shop Park
Humewood-Cedarvale_Toronto 4 School Restaurant Playground Indian Restaurant Synagogue Salon / Barbershop Dentist's Office
India Bazaar, The Beaches West_Toronto 4 Convenience Store Salon / Barbershop Park Board Shop Light Rail Station Laundry Service Pet Store
Islington Avenue, Humber Valley Village_Toronto 4 Residential Building (Apartment / Condo) Pharmacy Park Factory Bank Cupcake Shop Playground
Kennedy Park, Ionview, East Birchmount Park_Toronto 4 Pharmacy Chinese Restaurant Church Coffee Shop Parking Dentist's Office Salon / Barbershop
Kingsview Village, St. Phillips, Martin Grove Gardens, Richview Gardens_Toronto 4 Residential Building (Apartment / Condo) Gym Salon / Barbershop Medical Center Park Elementary School Financial or Legal Service
Lawrence Manor, Lawrence Heights_Toronto 4 Clothing Store Furniture / Home Store Design Studio Accessories Store Women's Store Miscellaneous Shop Cosmetics Shop
Lawrence Park_Toronto 4 College Classroom College Auditorium School Fast Food Restaurant Park Gym / Fitness Center High School
Leaside_Toronto 4 Bank Sporting Goods Shop Coffee Shop Automotive Shop Sandwich Place Furniture / Home Store Dentist's Office
Little Portugal, Trinity_Toronto 4 Art Gallery Bar Coffee Shop Salon / Barbershop Furniture / Home Store Boutique Bike Shop
Milliken, Agincourt North, Steeles East, L'Amoreaux East_Toronto 4 Chinese Restaurant School Medical Center BBQ Joint Doctor's Office Church Park
Mimico NW, The Queensway West, South of Bloor, Kingsway Park South West, Royal York South West_Toronto 4 Coworking Space Automotive Shop Gym / Fitness Center Fast Food Restaurant Miscellaneous Shop Food & Drink Shop Hardware Store
Moore Park, Summerhill East_Toronto 4 Taxi Other Great Outdoors Park Government Building Grocery Store Bridge Martial Arts School
New Toronto, Mimico South, Humber Bay Shores_Toronto 4 Pizza Place Coworking Space Medical Center Athletics & Sports Design Studio Fast Food Restaurant Miscellaneous Shop
North Toronto West, Lawrence Park_Toronto 4 Clothing Store Cosmetics Shop Shoe Store Health & Beauty Service Furniture / Home Store Men's Store Toy / Game Store
Northwood Park, York University_Toronto 4 Automotive Shop Furniture / Home Store Gas Station Pharmacy Doctor's Office Medical Center Bank
Parkdale, Roncesvalles_Toronto 4 Coffee Shop Spa Breakfast Spot Music Venue Clothing Store Gift Shop Art Gallery
Parkview Hill, Woodbine Gardens_Toronto 4 Convenience Store Intersection Bank Café Flower Shop Pet Store Fast Food Restaurant
Queen's Park, Ontario Provincial Government_Toronto 4 Government Building Medical Center Capitol Building Restaurant Doctor's Office College Library Medical Lab
Richmond, Adelaide, King_Toronto 4 Coffee Shop Food Court Café Vegetarian / Vegan Restaurant Ballroom Indian Restaurant Pool
Roselawn_Toronto 4 Dentist's Office Playground Gym Medical Center Doctor's Office Italian Restaurant Spa
Runnymede, Swansea_Toronto 4 Medical Center Dentist's Office Salon / Barbershop Sushi Restaurant Optical Shop Massage Studio Furniture / Home Store
St. James Town_Toronto 4 Residential Building (Apartment / Condo) Event Space Tech Startup Laundry Service Clothing Store Japanese Restaurant Design Studio
St. James Town, Cabbagetown_Toronto 4 Coffee Shop Flower Shop Street Art Pharmacy Restaurant Pizza Place Café
Steeles West, L'Amoreaux West_Toronto 4 Doctor's Office Bank Chinese Restaurant Dentist's Office Mobile Phone Shop Clothing Store Fast Food Restaurant
Stn A PO Boxes_Toronto 4 Residential Building (Apartment / Condo) Tech Startup Bar Pub Gym Hotel General Entertainment
Studio District_Toronto 4 Automotive Shop Moving Target Pharmacy Coffee Shop Nail Salon Doctor's Office Seafood Restaurant
The Beaches_Toronto 4 School Jewelry Store Doctor's Office Playground Laundry Service Bakery Miscellaneous Shop
The Danforth West, Riverdale_Toronto 4 Greek Restaurant Salon / Barbershop Spa Miscellaneous Shop Women's Store Gym / Fitness Center Health Food Store
Thorncliffe Park_Toronto 4 Church Bank Fast Food Restaurant Residential Building (Apartment / Condo) Indian Restaurant Grocery Store Gym / Fitness Center
Toronto Dominion Centre, Design Exchange_Toronto 4 Café Restaurant Coffee Shop Park Pharmacy Italian Restaurant Shoe Store
University of Toronto, Harbord_Toronto 4 College Residence Hall Student Center Food Truck College Library College Classroom College Academic Building College Lab
Upper Rouge_Toronto 4 Zoo Exhibit Cosmetics Shop Playground Golf Course Movie Theater Bridge Park
West Deane Park, Princess Gardens, Martin Grove, Islington, Cloverdale_Toronto 4 Residential Building (Apartment / Condo) School Park Daycare Church Convenience Store Clothing Store
Westmount_Toronto 4 Mobile Phone Shop Park Bank Dentist's Office Caribbean Restaurant Gas Station Auto Dealership
Wexford, Maryvale_Toronto 4 Middle Eastern Restaurant Grocery Store Intersection Medical Center Coffee Shop Vietnamese Restaurant Hookah Bar
Willowdale, Newtonbrook_Toronto 4 Church Bank Salon / Barbershop Medical Center Park Nail Salon Currency Exchange
Willowdale, Willowdale East_Toronto 4 Residential Building (Apartment / Condo) Bank Salon / Barbershop Bubble Tea Shop Restaurant Coffee Shop Park
Woburn_Toronto 4 Cosmetics Shop Indian Restaurant Pizza Place Church Salon / Barbershop Pharmacy Residential Building (Apartment / Condo)
Woodbine Heights_Toronto 4 Salon / Barbershop Automotive Shop Intersection Park Church Pizza Place Skate Park
In [95]:
clust_cats = []
clusters = [c1, c2, c3, c4, c5]
for i, clus in enumerate(clusters):
    clust_cats.append([])
    for n in clus.index.values:
        if n.endswith('NYC'):
            nn = n[:-4]
            clust_cats[i].extend(list(nyc_venues[nyc_venues['Neighborhood'] == nn]['Venue Category'].values))
        else:
            nn = n[:-8]
            clust_cats[i].extend(list(tor_venues[tor_venues['Neighborhood'] == nn]['Venue Category'].values))
    clust_cats[i] = pd.Series(clust_cats[i]).value_counts(normalize=True) * 100
In [96]:
# clust_cats[0]
In [97]:
tbl_bck = "#363636"
tbl_hdr_bck = "#363636"
tbl_txt = "#BBBBBB"

styles = [
    dict(selector="td", props=[("border", "0px solid #333"), ("padding", "8px 20px 8px 20px"), 
                               ("background", tbl_bck), ("text-align", "left"),
                               ("color", tbl_txt), ("font-size", "10pt")]),
    
    dict(selector="th", props=[("border", "0px solid #333"), ("padding", "8px 20px 8px 20px"), 
                               ("background", tbl_bck), ("text-align", "left"),
                               ("color", tbl_txt), ("font-size", "10pt")]),
    
    dict(selector=".col0", props=[("border-left", "1px solid #bbbbbb")]), 
    
    dict(selector="th.blank:nth-child(2)", props=[("border-left", "1px solid #bbbbbb")]),
    
    dict(selector="thead tr:nth-child(2) th", props=[("padding-top", "0"), ("padding-bottom", "8px")]),
    
    dict(selector="th.col_heading", props=[("background", tbl_hdr_bck), 
                                           ("color", "#FFCA91")]),
    
    dict(selector="th.index_name", props=[("background", tbl_hdr_bck), 
                                          ("color", "#8DCDFF")]),
    
    dict(selector="th.blank", props=[("background", tbl_hdr_bck), ("padding", "0")]),
    
    dict(selector="tr:nth-child(2n)", props=[("background", "white")]),
    
    dict(selector="thead tr:nth-child(2) th", props=[("border-bottom", "1px solid {}".format(tbl_txt))]),
    
    dict(selector="thead tr:nth-child(1) th", props=[("padding-top", "14px !important")]),
    
    dict(selector="tbody tr:last-child td", props=[("padding-bottom", "20px")]),
    
    dict(selector="tbody tr:last-child th", props=[("padding-bottom", "20px")]),
    
    dict(selector="td:hover", props=[("font-weight", "bold"), ("background", "#002b36"), ("color", "#8DCDFF")]),
]
In [98]:
for i in range(kclusters):
    c__ = clust_cats[i].to_frame("% of venues")
    c__.index.names = ['Category']
    html = (c__.head(7).style.set_table_styles(styles)
            .set_table_attributes('style="border-collapse: collapse; border: 2px solid #BBBBBB"'))
    display(HTML(disp_fmt.format("Cluster {}".format(i+1))))
    display(html)

Cluster 1:

% of venues
Category
Automotive Shop 13.9286
Church 2.78571
Gas Station 2.5
Salon / Barbershop 2.21429
Factory 2
Deli / Bodega 1.92857
Pizza Place 1.85714

Cluster 2:

% of venues
Category
Doctor's Office 13.5384
Residential Building (Apartment / Condo) 5.23145
Dentist's Office 3.8364
Medical Center 2.88523
Salon / Barbershop 2.40964
Deli / Bodega 2.34623
Laundry Service 1.6487

Cluster 3:

% of venues
Category
Residential Building (Apartment / Condo) 14.2916
Salon / Barbershop 3.28209
Deli / Bodega 2.61737
Laundry Service 2.30577
Doctor's Office 2.285
Church 1.72414
Park 1.51641

Cluster 4:

% of venues
Category
Salon / Barbershop 7.343
Deli / Bodega 3.98551
Pizza Place 2.47585
Church 2.35507
Laundry Service 2.29469
Chinese Restaurant 2.18599
Residential Building (Apartment / Condo) 2.04106

Cluster 5:

% of venues
Category
Residential Building (Apartment / Condo) 2.3309
Salon / Barbershop 2.0878
Church 1.7446
Doctor's Office 1.7303
Park 1.6016
Pizza Place 1.5873
Deli / Bodega 1.4014
In [99]:
n_counts = []
for c in clusters:
    nyc_c = 0
    tor_c = 0
    for n in c.index.values:
        if n.endswith('NYC'):
            nyc_c += 1
        else:
            tor_c += 1
    n_counts.append((nyc_c, tor_c))
In [100]:
ind = ['cluster 1', 'cluster 2', 'cluster 3', 'cluster 4', 'cluster 5']
city_c_df = pd.DataFrame({
    'NYC': [x[0] for x in n_counts],
    'Toronto': [x[1] for x in n_counts]
}, index = ind)

fig, ax = plt.subplots(figsize=fig_size, facecolor=fig_fc)
city_c_df.plot(kind='bar', color=['#2d1e86', '#f6962b'], rot=0, ax=ax)
plot_conf(ax, xlbl='', ylbl='Number of neighborhoods', t='')
fig.savefig('city-count.png', dpi=300)

Discussion

Our analysis shows that NYC and Toronto have the same Top 2 common venue categories: apartments and barbershops.

The Top 10 Common Venue Categories suggest what types of businesses are more likely to thrive.

The Rare Categories suggest what types of businesses are less desirable.

Conclusion

The neighborhoods of New York City and Toronto were clustered into multiple groups based on the categories of the venues in these neighborhoods. The results show that there are venue categories that are more common in some cluster than the others.

In [ ]: